| | 313 | [section:lock_tags Lock option tags] |
| | 314 | |
| | 315 | #include <boost/thread/locks.hpp> |
| | 316 | |
| | 317 | struct defer_lock_t {}; |
| | 318 | struct try_to_lock_t {}; |
| | 319 | struct adopt_lock_t {}; |
| | 320 | |
| | 321 | const defer_lock_t defer_lock; |
| | 322 | const try_to_lock_t try_to_lock; |
| | 323 | const adopt_lock_t adopt_lock; |
| | 324 | |
| | 325 | These tags are used in scoped locks constructors to specify a specific behavior. |
| | 326 | |
| | 327 | *`defer_lock_t`: is used to construct the scoped lock without locking it. |
| | 328 | *`try_to_lock_t`: is used to construct the scoped lock trying to lock it. |
| | 329 | *`adopt_lock_t`: is used to construct the scoped lock without locking it but adopting ownership. |
| | 330 | |
| | 331 | [endsect] |
| | 332 | |