[Python-Dev] PEP needed? Introducing Tcl objects (original) (raw)

Jeffrey Hobbs jeff@hobbs.org
Tue, 19 Feb 2002 08:53:53 -0800


Martin,

...

Of Jeff's options, invoking TclSetMaxBlockTime seemed to be most promising: I want TclDoOneEvent 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 TclDoOneEvent 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:

and see if that satisfies the need for responsiveness as well as not blocking.

Thanks,

Jeff