43 Commits

Author SHA1 Message Date
Brett Cannon
392b2cb4bc Fix typo in verbose output for RLock when the initial lock acquisition occurs.
Closes bug #1110998.
2005-01-27 22:52:09 +00:00
Brett Cannon
6e9eeff50e Backport Tim's cleanup of the previous commit to fix Thread.__delete() . 2004-07-21 05:08:32 +00:00
Brett Cannon
9d2ad5f44c dummy_threading when run with -O would raise a KeyError in Thread.__delete()
when called by atexit thanks to dummy_thread always returning -1 for
dummy_thread.get_ident().  Since exception was not an issue, it is now caught
and tossed.

Closes bug #993394.
2004-07-21 02:55:54 +00:00
Brett Cannon
a80b60b00a Fix bug introduced by previous backport. 2004-07-04 18:35:56 +00:00
Brett Cannon
17748ed1bb threading.Thread used to raise an exception about attempting to execute a
NoneType if an exception in a thread was raised during interpreter shutdown.
This led to a masking of the initial exception (not good).  All fixed (good).

Closes bug #754449 (using both patch #954922 and a backport of rev. 1.41 from
HEAD).
2004-07-03 19:58:58 +00:00
Tim Peters
59aba128a5 Make the classes exposed by threading.py new-style classes. This is
mostly for convenience and to aid debugging.
2003-07-01 20:01:55 +00:00
Tim Peters
0939fac795 Resolved minor XXX question in the obvious way. 2003-07-01 19:28:44 +00:00
Tim Peters
d1b108b953 Whitespace normalization. 2003-06-29 17:24:17 +00:00
Jeremy Hylton
89392c0005 Remove stub settrace() and setprofile() calls. 2003-06-29 17:07:46 +00:00
Jeremy Hylton
bfccb35b58 Add settrace() and setprofile() functions to the threading library. 2003-06-29 16:58:41 +00:00
Tim Peters
685e69739e Provide dummy (do-nothing) settrace() and setprofile() functions until
Jeremy can check in the real things.
2003-06-29 16:50:06 +00:00
Guido van Rossum
68468eba63 Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00
Fred Drake
a872595f31 - prefer "import ... as" to "import / (assignments) / del" for most things
- when the thread module isn't available, subsequent attempts to import
  threading should not suceed
2002-12-30 23:32:50 +00:00
Guido van Rossum
c262a1f51c Add __all__. (Brett Cannon.) 2002-12-30 21:59:55 +00:00
Guido van Rossum
21b60147e9 The _Event class should be more careful with releasing its lock when
interrupted.  A try/finally will do nicely.  Maybe other classes need
this too, but since they manipulate more state it's less clear that
that is always the right thing, and I'm in a hurry.

Backport candidate.
2002-11-21 21:08:39 +00:00
Jeremy Hylton
92bb6e7b96 Docstring nits: The module is neither proposed nor new. 2002-08-14 19:25:42 +00:00
Jeremy Hylton
29c2106465 Explain use of currentThread() in _Condition methods. 2002-08-14 17:56:13 +00:00
Jeremy Hylton
39c12bfba1 Explain a little more. 2002-08-14 17:46:40 +00:00
Jeremy Hylton
af7fde7f34 Explain a minor mystery. 2002-08-14 17:43:59 +00:00
Raymond Hettinger
46ac8eb3c8 Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i) 2002-06-30 03:39:14 +00:00
Guido van Rossum
8ca162f417 Partial introduction of bools where appropriate. 2002-04-07 06:36:23 +00:00
Tim Peters
bc0e910826 Convert a pile of obvious "yes/no" functions to return bool. 2002-04-04 22:55:58 +00:00
Neal Norwitz
45bec8c7fc SF #515023. Make _DummyThread.join() signature match base class (Thread) 2002-02-19 03:01:36 +00:00
Guido van Rossum
f21b2aafa9 Thread.__bootstrap(): ignore exceptions in the self.__delete() call in
the finally clause.  An exception here could happen when a daemon
thread exits after the threading module has already been trashed by
the import finalization, and there's not much of a point in trying to
insist doing the cleanup in that stage.

This should fix SF bug ##497111: active_limbo_lock error at program
exit.

2.1.2 and 2.2.1 Bugfix candidate!
2001-12-28 22:07:09 +00:00
Tim Peters
b64bec3ec0 Whitespace normalization. 2001-09-18 02:26:39 +00:00