compio-rs / compio

A thread-per-core Rust runtime with IOCP/io_uring/polling.
MIT License
420 stars 37 forks source link

Use eventfd to implement signal. #29

Closed Berrysoft closed 1 year ago

Berrysoft commented 1 year ago

https://github.com/Berrysoft/compio/issues/28#issuecomment-1711592536

Berrysoft commented 1 year ago

I'm not familiar with eventfd. Do you know why eventfd causes EBUSY in io-uring? @DXist

Is it because we closed the fd but not cancelled the read op?

DXist commented 1 year ago

Haven't used it yet.

Do you have full completion queue when you try to submit? Do you read in blocking way?

There is a relevant issue in monoio

Berrysoft commented 1 year ago

Poller::post is removed because it is not consistent between platforms. A new type Event is added, providing functionality to wake up driver. Event uses eventfd for io-uring, and calls PostQueuedCompletionStatus on Windows.

Berrysoft commented 1 year ago

I think we could move RefCells into runtime and wrap Runtime::driver field.

I'll try that.