Revision 42a999d1
ID | 42a999d1a3bbf9911dd2de149b02ad5354dd8261 |
Locking: add ssynchronized decorator
This patch creates a new decorator function ssynchronized in the locking
library, which takes as input a SharedLock, and synchronizes access to
the decorated functions using it. The usual SharedLock semantics apply,
so it's possible to call more than one synchronized function at the same
time, when the lock is acquired in shared mode, and still protect
against exclusive access.
The patch also adds a few unit test to check the basic decorator's
functionality, and to provide an example on how to use it.
Reviewed-by: iustinp
Files
- added
- modified
- copied
- renamed
- deleted