more-executors icon indicating copy to clipboard operation
more-executors copied to clipboard

Improve fork-safety

Open rohanpm opened this issue 5 years ago • 1 comments

I haven't investigated the behavior on fork, but as several futures created by this library are backed by threads and as threads aren't copied over a fork, it seems likely that an application using more-executors and fork() could end up with a bunch of futures which hang when accessed.

It would be nice if this could be improved. It can't be made to "work", but it could possibly be made to fail in a predictable way.

For example, can we make it so that after a fork, any future which depended on a disappeared thread is automatically failed?

rohanpm avatar Apr 11 '19 02:04 rohanpm

Executors themselves would also have to be marked either as dead, or have the ability to restart their dead worker threads.

rohanpm avatar Apr 11 '19 02:04 rohanpm