dabeaz / thredo

Thredo was an experiment - It's dead. Feel free to look around.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The windmills and worms in the mind of threads...

HarveySummers opened this issue · comments

Wouldn't you want to optionally register one or more callbacks that react to kill command. This would route the kill to a seperate (spawned) thread that would know how to cleanup and cleanly kill the main thread. A "last will and testament" thread could upon startup register its own monitor or a timer to kill itself (thread suicide?).

Also, a theme song? https://www.youtube.com/watch?v=Twix375Me4Q

There are probably many ways in which one can manage cancellation. The really big requirement, however, is that when threads are blocked, there needs to be some way to unblock them when cancelled. Thredo minimally provides that so if one were to do something more sophisticated, this would be a starting a point.