cats-effect
cats-effect copied to clipboard
Can we implement some flavor of `interruptible` on Native using signals?
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.
I like this idea. Might be difficult to do it in the type classes though, but IO should be very achievable.