about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-11-25 17:55:41 -0800
committerAlex Crichton <alex@alexcrichton.com>2013-11-25 17:55:41 -0800
commitac59888d8f466522a9802ee7d33134505794ee12 (patch)
treef3577feb56ac8aec687895d58fdd6938848aae33 /src/rustllvm/RustWrapper.cpp
parent679a2c042fb2541f55f1192ca97672907b258337 (diff)
downloadrust-ac59888d8f466522a9802ee7d33134505794ee12.tar.gz
rust-ac59888d8f466522a9802ee7d33134505794ee12.zip
Move LittleLock to using RAII
This moves the locking/waiting methods to returning an RAII struct instead of
relying on closures. Additionally, this changes the methods to all take
'&mut self' to discourage recursive locking. The new method to block is to call
`wait` on the returned RAII structure instead of calling it on the lock itself
(this enforces that the lock is held).

At the same time, this improves the Mutex interface a bit by allowing
destruction of non-initialized members and by allowing construction of an empty
mutex (nothing initialized inside).
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions