|
◆ lock()
template<typename T , typename SubscribeFn = function<prepared_coro(promise<T>)>>
subscribe and lock value during processing
- Parameters
-
ptr | pointer instance (initially initialized to nullptr). The function updates the pointer. It starts to point to the value. When pointer is held, the publisher is blocked. You can process the value, and need to use the pointer to subscribre for next value, which also unblock the publisher. If you drop the pointer, the publisher is also unblocked |
Definition at line 157 of file subscription.h.
|