
15 Feb
2014
15 Feb
'14
4:53 p.m.
When using forkFinally or bracket, I like to have the guarantee that the cleanup action will be executed regardless of how the action or thread is terminated — normally or via an exception. Of course, all guarantees are off when dealing with SIGKILL or power reset, but there's one other annoying exception (no pun intended) — when the main thread terminates, all other threads are silently shut down, without any chance to clean up. Why is it done that way? Why not kill them with an async exception instead? That would be a more uniform behavior. Are there any good ways to protect again the main thread exit? (Note that I'm talking about a library, so I can't have direct control over what's going on in the main thread.) Roman
4113
Age (days ago)
4113
Last active (days ago)
0 comments
1 participants
participants (1)
-
Roman Cheplyaka