1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #ifndef BASE_THREADING_THREAD_CHECKER_IMPL_H_
- #define BASE_THREADING_THREAD_CHECKER_IMPL_H_
- #include "base/base_export.h"
- #include "base/compiler_specific.h"
- #include "base/sequence_token.h"
- #include "base/synchronization/lock.h"
- #include "base/thread_annotations.h"
- #include "base/threading/platform_thread.h"
- namespace base {
- class LOCKABLE BASE_EXPORT ThreadCheckerImpl {
- public:
- ThreadCheckerImpl();
- ~ThreadCheckerImpl();
-
-
-
-
-
-
- ThreadCheckerImpl(ThreadCheckerImpl&& other);
- ThreadCheckerImpl& operator=(ThreadCheckerImpl&& other);
- bool CalledOnValidThread() const WARN_UNUSED_RESULT;
-
-
-
- void DetachFromThread();
- private:
- void EnsureAssignedLockRequired() const EXCLUSIVE_LOCKS_REQUIRED(lock_);
-
-
- mutable base::Lock lock_;
-
- mutable PlatformThreadRef thread_id_ GUARDED_BY(lock_);
-
-
-
-
-
-
- mutable TaskToken task_token_ GUARDED_BY(lock_);
-
-
-
-
- mutable SequenceToken sequence_token_ GUARDED_BY(lock_);
- };
- }
- #endif
|