zlacker

[return to "The Downsides of Go's Goroutines"]
1. keving+F7[view] [source] 2023-12-31 06:49:44
>>djha-s+(OP)
Externally canceling a task at a location other than a known stopping point is used as an example here, but in most environments doing this is a known-bad design decision, since the terminated thread-or-task might have been holding a mutex, and now that mutex is stuck closed forever. .NET has been closing the door on this primitive for years (https://learn.microsoft.com/en-us/dotnet/core/compatibility/...)
◧◩
2. mrkeen+Ff[view] [source] 2023-12-31 09:21:20
>>keving+F7
Haskell does this.

Threads can cancel other threads.

ResourceT and bracket are two ways for a thread to register clean-up code in the event that they are cancelled.

[go to top]