Martin, ... > Of Jeff's options, invoking Tcl_SetMaxBlockTime seemed to be most > promising: I want Tcl_DoOneEvent to return after 20ms, to give other > Tcl threads a chance. So I invented the patch ... > ought to continously increase the counter in the label (once a > second), but doesn't, atleast not on Linux, using Tcl 8.3.3. In the > strace output, it appears that it first does a select call with a > timeout, but that is followed by one without time limit before > Tcl_DoOneEvent returns. IIRC, Tcl_SetMaxBlockTime is a one-short call - it sets the next block time, not all block times. I'm sure there was a reason for this, but that was implemented before I was a core guy. Anyway, I think you just need to try: - result = Tcl_DoOneEvent(TCL_DONT_WAIT); + Tcl_SetMaxBlockTime(&blocktime); + result = Tcl_DoOneEvent(0); and see if that satisfies the need for responsiveness as well as not blocking. Thanks, Jeff
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4