awaitAsyncCompletion method

bool awaitAsyncCompletion()

Await for all (including future) async submissions to be completed (the async queue becomes idle for a moment).

Returns true if all submissions were completed or async processing was not started; false if shutting down (or an internal error occurred).

Use to wait until all puts by Box.putQueued have finished.

Implementation

bool awaitAsyncCompletion() {
  final result = C.store_await_async_submitted(_ptr);
  reachabilityFence(this);
  return result;
}