Execute func when all pending stream actions have completed. func must be brief and non-blocking since it executes in the one thread used for all such callbacks and also buffer deletions.
| 70 | // func must be brief and non-blocking since it executes in the one |
| 71 | // thread used for all such callbacks and also buffer deletions. |
| 72 | inline void ThenExecute(se::Stream* stream, std::function<void()> func) { |
| 73 | mutex_lock l(mu_); |
| 74 | QueueFunc(stream, std::move(func)); |
| 75 | PollEvents(stream); |
| 76 | } |
| 77 | |
| 78 | private: |
| 79 | friend class TEST_EventMgr; |
no outgoing calls