Hello everyone, I know that as I have read through quite a few posts and it has been brought up I wanted to know if there was any concrete clarification for several questions I have with IO.
-
Will it be possible to use multiple IO implementations within the same program as long as you don’t swap out which implementation you may call something like cancel with IE if a func is create with Threaded Io, you cannot use Iouring’s implementation to call cancel on it.
-
Given a particular context where Iouring maybe the Io implementation that we have specified, but a type can be accelerated only with Threaded but not Iouring, is there a way to detect the implementation and, if you can can you for the lifetime of that struct create your own Io implementation.
-
If lets say you can only ever have 1 Io implementation, threaded, Iouring, threaded + iouring. Why is it we use function pointers and not a concrete type that directly call the functions and not introduce the indirection.
-
I’m assuming it will be possible to create an Io that is threaded + iouring, but that has to be done at the implementation of the interface level. IE I cannot spawn a thread with threaded Io, and then in that thread create another Io interface that is iouring?
-
Not so much as a question, but a request of the zig team. As someone who has been playing with Io sense day 1, I would greatly appreciate some insanely robust documentation, including some clear examples of common patterns IE block on list of tasks ignoring results, exiting early when a member of that list fails, good cancellation patterns etc. I really like the IO interface, but I feel like there needs to be a lot of very concrete examples, given that it’s rather novel in comparison to most if not all other async implementations.