|
From: Christian W. <Chr...@t-...> - 2025-10-14 09:41:32
|
On 10/14/2025 11:14 AM, Jan Nijtmans wrote: > Op di 14 okt 2025 om 11:01 schreef Christian Werner: >> Lesson learned: you cannot wait in a signal handler, it's that simple. >> >> Thank you for your attention to this matter. > > YW. Conclusion: TIP #509 didn't fix the deadlock on TclX, but TIP #511 > did. Conclusion 2: You cannot wait in a signal handler. Agreed too. > > You didn't answer my question about the "consistent behavior" The "consistent behaviour" is a quote of the TIP#509 text, so unfortunately not my own invention. And yes, when we now want to start bean counting, the Win32 CRITICAL_SECTIONS are reentrant but will of course spectacularly fail when combined with Tcl_Condition. We just could add a prominent note regarding this fact, and live on like we did the 15+ years before TIP#509, since obviously nobody cared about consistency at all. Alternatively, could we add code for Win32 to enforce consistency. But the fine question then must be consequently, how could we survive 15+ years without big problems in this regard? Christian PS: While at bean counting: the path which lead to TIP#509 introduced a deadlock in TclX. TIP#511 didn't fix it but delivered the right tool for dealing with POSIX signals. And to pour even more fire accelerant, multi threaded Tcl's Tcl_AsyncHandler infrastructure was entirely in tatters until the advent of TIP#511. |