diff options
author | Guido van Rossum <guido@python.org> | 1998-06-15 04:36:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-06-15 04:36:09 (GMT) |
commit | 62320c9b9b4449feacf73980c19979f0e4abb655 (patch) | |
tree | 400a3e5dc8689f80afe234eb9aaa40580008bd45 /Python/pythonrun.c | |
parent | ad4db17552b631bc94a47d75d6de2934f328cc7d (diff) | |
download | cpython-62320c9b9b4449feacf73980c19979f0e4abb655.zip cpython-62320c9b9b4449feacf73980c19979f0e4abb655.tar.gz cpython-62320c9b9b4449feacf73980c19979f0e4abb655.tar.bz2 |
# (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.
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions