namespace mojo {
-Thread::Thread()
- : options_(),
- thread_(),
- started_(false),
- joined_(false) {
+Thread::Thread() : options_(), thread_(), started_(false), joined_(false) {
}
Thread::Thread(const Options& options)
- : options_(options),
- thread_(),
- started_(false),
- joined_(false) {
+ : options_(options), thread_(), started_(false), joined_(false) {
}
Thread::~Thread() {
assert(!joined_);
pthread_attr_t attr;
- int rv MOJO_ALLOW_UNUSED = pthread_attr_init(&attr);
+ int rv = pthread_attr_init(&attr);
+ MOJO_ALLOW_UNUSED_LOCAL(rv);
assert(rv == 0);
// Non-default stack size?
assert(!joined_);
joined_ = true;
- int rv MOJO_ALLOW_UNUSED = pthread_join(thread_, NULL);
+ int rv = pthread_join(thread_, NULL);
+ MOJO_ALLOW_UNUSED_LOCAL(rv);
assert(rv == 0);
}