nine Good morning, brrt! 09:42
brrt good * nine
i presume morning, fwiw
:-)
i was reading jnthn++ s nice post. and i was thinking obviously only of the technical issue
see,
since fork() will kill any threads 09:43
except for the forking thread
why don't we... cooperate with that a bit?
as in, implement and wait for orderly shutdown of all currently running threads, and fork only then
(seeing the activity from MasterDuke++ and nine++ tells me it is high time for me to blog once more) 09:46
nine Reading pthread_atfork (3p) it sounds at least possible to safely fork() a program running only one thread + the spesh worker. We'd have to synchronize the threads, properly shut down the spesh worker and restart it in both processes after the fork. 10:02
brrt proper shutdown of the spesh worker should be possible 10:06
also
we already have the gc syncpoint
*mechanism for waiting for threads to block 10:07
the way i'm thinking off spesh worker shutdown, is to: - flush the existing work quue and put a sentinel value 10:08
and for those threads that are waiting for a syscall, we might be able to interupt them with a well-placed signal
Geth MoarVM: cygx++ created pull request #789:
Make MVM_spesh_manipulate_remove_handler_successors() public
23:04