cats-effect icon indicating copy to clipboard operation
cats-effect copied to clipboard

Can we implement some flavor of `interruptible` on Native using signals?

Open armanbilge opened this issue 5 months ago • 1 comments

It seems like most blocking syscalls will return -1 and set errno to EINTR if a signal is sent to the thread while the syscall is executing. So this seems like an interesting way to support (more graceful) cancelation of these operations on Native. On the JVM, we often resort to a clunky cancelable which typically closes a file descriptor to force the syscall to terminate.

armanbilge avatar Jul 30 '25 17:07 armanbilge

I like this idea. Might be difficult to do it in the type classes though, but IO should be very achievable.

djspiewak avatar Jul 30 '25 17:07 djspiewak