mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibThreading: Neither Mutex or MutexLocker should be movable / copyable
This commit is contained in:
parent
fdea5e1628
commit
bff33c67ab
Notes:
sideshowbarker
2024-07-18 03:51:09 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/bff33c67ab4 Pull-request: https://github.com/SerenityOS/serenity/pull/10053
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
|||
namespace Threading {
|
||||
|
||||
class Mutex {
|
||||
AK_MAKE_NONCOPYABLE(Mutex);
|
||||
AK_MAKE_NONMOVABLE(Mutex);
|
||||
friend class ConditionVariable;
|
||||
|
||||
public:
|
||||
|
@ -39,6 +41,9 @@ private:
|
|||
};
|
||||
|
||||
class MutexLocker {
|
||||
AK_MAKE_NONCOPYABLE(MutexLocker);
|
||||
AK_MAKE_NONMOVABLE(MutexLocker);
|
||||
|
||||
public:
|
||||
ALWAYS_INLINE explicit MutexLocker(Mutex& mutex)
|
||||
: m_mutex(mutex)
|
||||
|
|
Loading…
Reference in a new issue