compio-rs / compio

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

fix(signal,unix): use pipe #183

Closed Berrysoft closed 9 months ago

Berrysoft commented 9 months ago

Closes #182

The signal handler may be called at any time in the thread, so it's not safe to use RefCell. Here we use a OS pipe to avoid any possible signal-unsafe functions. However, it needs another thread to notify the events.