Artifacts Associated With Ticket 2994388fffffffffffffffffffffffffffffffff
Ticket change [a22aca0d27] (rid 109843) by ferrieux on 2010-04-29 21:09:57:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Now that threaded builds are default in unix too, one incompatibility suddenly pops out: [vwait] is now unable to report the "would wait forever" error. This implies that simple scripts that don't use [catch] nor [bgerror], and rely on the starvation of event sources to exit, now deadlock. Typically: a single fileevent on stdin. Other example: a single, self-reposting [after]. If any error pops out of the handler uncaught, the fileevent handler is disabled, and the [after] handler doesn't repost. Formerly this instructed the script to simply barf "would wait forever" in errorInfo on stderr, and exit. Now it deadlocks forever. This is hard to justify because the script is single-threaded and this regression comes with threading. This kind of 'no-fat' style allows for very short and very readable, powerful event-driven tools. I have many of them in server-side apps, participating in long pipe chains, and a deadlock there is a nightmare. A solution would be to restore the unthreaded behavior when no Tcl threads have been created. A more elaborate solution would also take care of non-Tcl "alien threads", signal handlers, and other exotic sources, by using a global, per-process counter that would accumulate: +1 per fileevent +1 per timer +1 for Tk +1 per thread +1 per (hypothetical) signal handler, etc... Then [vwait] would error out "would wait forever" when this counter reaches zero. I'm giving this a high prio because it is a regression, and the switch to default unthreaded in unix is recent, meaning that some consequences might be pondered again.
- foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "8"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "ferrieux"
- subsystem initialized to: "02. Event Loops"
- title initialized to:
vwait's "would wait forever" lost in threaded builds
- type initialized to: "Bug"
Ticket change [3330c50272] (rid 106542) by ferrieux on 2011-08-19 23:08:09:
- icomment:
Lowest prio. No hope to go back, but leaving it open for reference.
- login: "ferrieux"
- mimetype: "text/plain"
- priority changed to: "1 Zero"
- username: "ferrieux"
- icomment: