Skip to content
Snippets Groups Projects
Select Git revision
  • 827b79aec1066528f35ab403e72830baf0fea7ab
  • master default protected
  • io_uring_set_taskrun_flags
  • steal-all-io-on-hint
  • ripripgrepv4
  • io-sleep-strategies-msg-ring
  • improve-echoclient
  • improve-even-pulse
  • waitfd-sleep-strategy2
  • ripripgrepv2.5-io-sleep
  • ripripgrepv3-io-sleep
  • ripripgrepv3
  • ripripgrepv2
  • du
  • select2
  • linked-echoserver
  • cancel-callbacks-simple
  • cancel-callbacks
  • callback-fsearch-alternative
  • callback-fsearch
  • fsearch-track-outfile-offset
21 results

emper

Florian Fischer's avatar
Florian Fischer authored
Futures can have a registered Callback of type
std::function<void(const uint32_t&)> which gets called in a new
Fiber with the result of the IO Request.
Note the first completion will cause the execution of a callback and
partial completion support must be implemented manually in the callback.

Callbacks are stored in a heap allocated std::function on registration
and are freed by the new Fiber after the callback returned;

The Future with a registered Callback is not referenced in any way in
the IO subsystem and therefore can be dropped after being submitted.
This also means that a Future with a registered callback will not be
signaled by the IO subsystem on completion.
If signaling is desired one must implement it manually in the registered
callback.
827b79ae
History