[Python-Dev] PEP needed? Introducing Tcl objects

Michael Hudson mwh@python.net
19 Feb 2002 09:50:21 +0000

martin@v.loewis.de (Martin v. Loewis) writes:

> 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.
> Jeff, any ideas as to why this is happening?

Well, at least this one is easy.  From the link Jeff posted:

  Information provided to Tcl_SetMaxBlockTime is only used for the
  next call to Tcl_WaitForEvent; it is discarded after
  Tcl_WaitForEvent returns. The next time an event wait is done each
  of the event sources' setup procedures will be called again, and
  they can specify new information for that event wait.

so you need to move the Tcl_SetMaxBlockTime inside the while loop.

It certainly looks to this novice as if 8.3 provides enough hooks to
do what we want, but...


  Like most people, I don't always agree with the BDFL (especially
  when he wants to change things I've just written about in very 
  large books), ... 
         -- Mark Lutz, http://python.oreilly.com/news/python_0501.html