Commit bc254c2a authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

let SharedMutexToken export a nice interface

Summary: Basically it needs a nice constructor and `operator bool`.

Reviewed By: iahs

Differential Revision: D31188190

fbshipit-source-id: ec64d944674b0879e045aa92df95c592f66c3be4
parent e652b1b2
......@@ -247,8 +247,12 @@ struct SharedMutexToken {
DEFERRED_SHARED,
};
Type type_;
uint16_t slot_;
Type type_{};
uint16_t slot_{};
constexpr SharedMutexToken() = default;
explicit operator bool() const { return type_ != Type::INVALID; }
};
#ifndef FOLLY_SHARED_MUTEX_MAX_SPIN_DEFAULT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment