3 ms·
You have to be able to direct a signal to the thread blocked on the syscall to be terminated. Go has no way to obtain the Id of that thread. That's what the is
by networkimprov 6y ago
You have to be able to direct a signal to the thread blocked on the syscall to be terminated.
Go has no way to obtain the Id of that thread. That's what the issue I linked above covers.
- mleonhard 6y agoHere's some Golang code that does it: https://github.com/kawasin73/gointr https://github.com/kawasin73/gointr I think you could use that technique to make blocking syscalls that take a context.Context and return early if the context becomes done.