#include <atomic>
#include <thread>
#include <mutex>
Go to the source code of this file.
|
| #define | synchronized(M) for(Lock M##_lock = M; M##_lock; M##_lock.setUnlock()) |
| | This macro provides 'Java-like' synchronized blocks in C++. More...
|
| |
| #define | synch(M) { Lock M##_lock = M; for (; M##_lock; M##_lock.setUnlock()) |
| | These macros provide 'Java-style' synchronization for methods in C++. More...
|
| |
| #define | synch_end } |
| |
| #define | finally() auto _final_obj=_finally([&] |
| |
| #define | finally1(M) auto M##_final_obj=_finally([M] |
| |
| #define | finally2(M, M2) auto M##_final_obj=_finally([M,M2] |
| |
| #define | finally3(M, M2, M3) auto M##_final_obj=_finally([M,M2,M3] |
| |
| #define | finally4(M, M2, M3, M4) auto M##_final_obj=_finally([M,M2,M3,M4] |
| |
| #define | finally5(M, M2, M3, M4, M5) auto M##_final_obj=_finally([M,M2,M3,M4,M5] |
| |
◆ finally
| #define finally |
( |
| ) |
auto _final_obj=_finally([&] |
◆ finally1
| #define finally1 |
( |
|
M | ) |
auto M##_final_obj=_finally([M] |
◆ finally2
| #define finally2 |
( |
|
M, |
|
|
|
M2 |
|
) |
| auto M##_final_obj=_finally([M,M2] |
◆ finally3
| #define finally3 |
( |
|
M, |
|
|
|
M2, |
|
|
|
M3 |
|
) |
| auto M##_final_obj=_finally([M,M2,M3] |
◆ finally4
| #define finally4 |
( |
|
M, |
|
|
|
M2, |
|
|
|
M3, |
|
|
|
M4 |
|
) |
| auto M##_final_obj=_finally([M,M2,M3,M4] |
◆ finally5
| #define finally5 |
( |
|
M, |
|
|
|
M2, |
|
|
|
M3, |
|
|
|
M4, |
|
|
|
M5 |
|
) |
| auto M##_final_obj=_finally([M,M2,M3,M4,M5] |
◆ synch
| #define synch |
( |
|
M | ) |
{ Lock M##_lock = M; for (; M##_lock; M##_lock.setUnlock()) |
These macros provide 'Java-style' synchronization for methods in C++.
◆ synch_end
◆ synchronized
| #define synchronized |
( |
|
M | ) |
for(Lock M##_lock = M; M##_lock; M##_lock.setUnlock()) |
This macro provides 'Java-like' synchronized blocks in C++.
◆ _finally()