mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
LibThreading: Neither Mutex or MutexLocker should be movable / copyable
This commit is contained in:
parent
fdea5e1628
commit
bff33c67ab
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…
Add table
Add a link
Reference in a new issue