Closed lukester1975 closed 1 year ago
Thank you for this!
I will look into it and fix it. Regarding EINTR you are correct. In fact I have a fix (and some improvements) in the pipeline here
I haven't managed yet to merge it yet but I will try do so today.
I've fixed the trivial stuff. For the other error: I have yet to debug the cause. Currently I'm suspecting some misuse of the io_uring
interface. For example, I am ignoring the dropped
counter for the submission queue. I will try to allocate time soonish.
I currently assume that the implementation is correct but the example is wrong.
exec::schedule_after(scheduler2, 4s) | stdexec::then([&] { context.request_stop(); }),
is NOT wrapped in a exec::finally
which means it is not executed when context2 is stopped before the timed schedule can complete.
I don't know anymore what my intention have been, either I forgot to wrap this in a finally
sender or I mixed scheduler
and scheduler2
Since c9df036823bd4e5719e4aa491c065e564bdb0f3a (
stdexect_examples
typo). Presumably as a result, it seems to have bitrotted a bit :)In https://github.com/lukester1975/stdexec/tree/fix-uring-example I've put a cmake fix and a few other hacks to try to get the example working. Happy to separate out the cmake fix in to a PR. I'm sure the rest is largely nonsense...
Presumably
context.run()
should becontext.run_until_stopped()
after 5bb97462362a5ebac31fcf49c9fb69f259d22862?The example still seems a bit racy. Sometimes it works:
Other times:
I've not looked at that in any depth as it made my brain melt. It did seem
context.reset()
was required to ever get it to work, though.Maybe I should open separate issue for this, but should
run_until_stopped()
restartIORING_ENTER_GETEVENTS
if it getsEINTR
? Otherwiserun_until_stopped()
needs wrapping in a loop and try/catch, presumably? Gets interrupted a lot when debugging.Kernel is 6.5.6-200.fsync.fc38.x86_64 from nobara. Perhaps I should double check with something more vanilla...
Thanks!