Skip to content

Fix daemon indefinite stalling on interrupt

John Johnson requested to merge jdj34/occam:jdj34/fix-stalling into develop

The previous daemon thread behavior made it so that user jobs could potentially indefinitely stall shutdown, since there would be a join on a blocked thread. Now there is an attempt to gracefully terminate all of the threads, and if that fails the threads get terminated as daemons when the main thread exits.

Shutting down using the new method also makes it so the socket connection gets closed each time, unlike in the case where you have to spam interrupts which bring down the main thread before this can happen.

Fixes #43 (closed)

Edited by John Johnson

Merge request reports