On Tue, 2014-11-11 at 13:31 -0800, Merijn Verstraaten wrote:
The flaw in your argument is that you're assuming that the author of a cleanup action is a single library author, rather than a random user using bracket with a random action from library X as cleanup.
Do you mean a case when cleanup is a random action not designed for that? Sounds really bad. Do you have an example?
Now the user has to investigate whether random action X can block.
Any action can block unless explicitly stated, no need to investigate. Any random action can throw synchronous exception, and you should be prepared to handle that anyway. How interruptibleMask helps here? Sorry if you have to explain me the same things twice. English is not my native language, and I may misunderstand your arguments or misformulate my own. Thank you, Yuras
There's not a single library that properly documents "this action can potentially block" because in many cases even the library authors themselves aren't sure. Not to mention, even if library authors *did* document this, then this would be incredibly brittle as the correctness of my code now relies on my recursive dependencies all properly documenting blocking behaviour AND following the PVP to avoid accidental breakage.
This is just not realistic, the only sane option is to fix it unambiguously in bracket so I as a user can safely assume that my cleanup is never interrupted.
Unless you can provide me with a concrete, *real*, actual library that requires cleanup to be interruptible, I will not believe this line of arguing.