Scoped Lock |
The scoped_lock_d directive constructs a parser that locks a mutex during the attempt to match the contained parser.
Syntax:
scoped_lock_d(mutex&)[body-parser]
Note, that nesting scoped_lock_d directives bears the risk of deadlocks since the order of locking depends on the grammar used and may even depend on the input being parsed. Locking order has to be consistent within an application to ensure deadlock free operation.
Copyright © 2003 Martin Wille
Permission to copy, use, modify, sell and distribute this document
is granted provided this copyright notice appears in all copies. This document
is provided "as is" without express or implied warranty, and with
no claim as to its suitability for any purpose.