|
MoonGen
|
Lock ... More...
Go to the source code of this file.
Functions | |
| function lock | tryLock (timeout) |
| Try to acquire the lock, blocking for max <timeout> microseconds. More... | |
| function lock | __call (func,...) |
| Wrap a function call in lock/unlock calls. More... | |
| function lock __call | ( | func | , |
| ... | |||
| ) |
Wrap a function call in lock/unlock calls.
Calling this is equivalent to the following pseudo-code:
| func | the function to call |
| ... | arguments passed to the function |
| function lock tryLock | ( | timeout | ) |
Try to acquire the lock, blocking for max <timeout> microseconds.
This function does not block if timeout is <= 0. This function may fail spuriously, i.e. return early or fail to acquire the lock.
| timeout | max time to wait in us |