tibasSpace_TakeEx()
Returns and atomically removes from the space the tuple (if one exists) whose tuple key fields match the key fields of the tuple provided. Allows you to specify a lock wait value, a lock and unlock value, a forget value, and a filter.
Declaration
tibas_status tibasSpace_TakeEx( tibasSpace space, tibasTuple* value, tibasTuple key, tibasTakeOptions options)
Remarks
Use the tibasSpace_TakeEx() function to return and atomically remove from the space the tuple (if one exists) whose tuple key fields match the key fields of the tuple provided. Allows you to specify a lock wait value, a lock and unlock value, a forget value, and a filter.
The options parameter provides a tibasTakeOptions structure that specifies the options for the take. The tibasTakeOptions structure is defined as follows:
struct _tibasTakeOptions { tibas_long lockWait; tibas_boolean lock; tibas_boolean unlock; tibas_boolean forget; const char* filter; };
The take options are defined as follows:
- lockWait
- Specifies a lock wait time, in milliseconds.
- lock
- Take the data and lock the tuple.
- unlock
- Unlock the tuple. Only the thread or process that locked the tuple can unlock it.
Lock and unlock are mutually exclusive. If you use one of these, code NULL for the other.
- forget
- Specify this option if you want the system to forget the return. This is useful if you do not need the tuple.
- filter
- Specify a filter string so that the operations are performed only on the data set that matches with the specified filter.