« Previous | Next » 

Revision 42a999d1

ID42a999d1a3bbf9911dd2de149b02ad5354dd8261
Parent 5b4cd1b0
Child f78ede4e

Added by Guido Trotter almost 14 years ago

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

View differences