]> granicus.if.org Git - python/commit
# (My first checkin from Windows NT using remote CVS!)
authorGuido van Rossum <guido@python.org>
Mon, 15 Jun 1998 04:36:09 +0000 (04:36 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 15 Jun 1998 04:36:09 +0000 (04:36 +0000)
commit62320c9b9b4449feacf73980c19979f0e4abb655
tree400a3e5dc8689f80afe234eb9aaa40580008bd45
parentad4db17552b631bc94a47d75d6de2934f328cc7d
# (My first checkin from Windows NT using remote CVS!)

There were some serious problem with the thread-safety code.
The basic problem was that often the result was gotten out of
the Tcl interpreter object after releasing the Tcl lock.
Of course, another thread might have changed the return value
already, and this was indeed happening.  (Amazing what trying
it on a different thread implementation does!)

The solution is to grab the Python lock without releasing the
Tcl lock, so it's safe to create a string object or set the
exceptions from the Tcl interpreter.  Once that's done, the
Tcl lock is released.

Note that it's now legal to acquire the Python lock while the
the Tcl lock is held; but the reverse is not true: the Python
lock must be released before the Tcl lock is acquired.  This
in order to avoid deadlines.  Fortunately, there don't seem to
be any problems with this.
Modules/_tkinter.c