summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
Commit message (Collapse)AuthorAgeFilesLines
* Thread.__delete: Discussion of internal obscurities belongs in commentsTim Peters2004-07-211-31/+28
| | | | | | | | rather than in docstrings. Rewrote so that _active_limbo_lock is released no matter what happens (it could have been left locked if _sys got None'd out). Use "in" in preference to has_key() for dict lookup. Don't bother looking for 'dummy_threading' in sys.modules unless KeyError is raised. Since the heart of the method is the del, do that in only one place.
* Fix bug where a KeyError was raised if -O was being used for the interpreterBrett Cannon2004-07-211-1/+33
| | | | | | | | | and Thread.__delete() was called after a Thread instance was created. Problem resulted from a currentThread() call in an 'assert' statement being optimized out and dummy_thread.get_ident() always returning -1 and thus overwriting the entry for the _MainThread() instance created in 'threading' at import time. Closes bug #993394.
* Implemented thread-local data as proposed on python-dev:Jim Fulton2004-07-141-1/+9
| | | | http://mail.python.org/pipermail/python-dev/2004-June/045785.html
* threading.Thread objects will now print a traceback for an exception raisedBrett Cannon2004-07-031-2/+38
| | | | | | | during interpreter shutdown instead of masking it with another traceback about accessing a NoneType when trying to print the exception out in the first place. Closes bug #754449 (using patch #954922).
* Remove calls to currentThread() in _Condition methods that were side-effect.Brett Cannon2004-03-081-2/+0
| | | | | | | | | Side-effects were deemed unnecessary and were causing problems at shutdown time when threads were catching exceptions at start time and then triggering exceptions trying to call currentThread() after gc'ed. Masked the initial exception which was deemed bad. Fixes bug #754449 .
* * Move collections.deque() in from the sandboxRaymond Hettinger2004-01-291-2/+3
| | | | | | * Add unittests, newsitem, and whatsnew * Apply to Queue.py mutex.py threading.py pydoc.py and shlex.py * Docs are forthcoming
* Add traceback.format_exc().Neil Schemenauer2003-11-051-5/+2
|
* Make the classes exposed by threading.py new-style classes. This isTim Peters2003-07-011-3/+7
| | | | mostly for convenience and to aid debugging.
* Resolved minor XXX question in the obvious way.Tim Peters2003-07-011-1/+1
|
* Whitespace normalization.Tim Peters2003-06-291-2/+2
|
* Remove stub settrace() and setprofile() calls.Jeremy Hylton2003-06-291-8/+0
|
* Add settrace() and setprofile() functions to the threading library.Jeremy Hylton2003-06-291-0/+20
|
* Provide dummy (do-nothing) settrace() and setprofile() functions untilTim Peters2003-06-291-1/+9
| | | | Jeremy can check in the real things.
* Get rid of many apply() calls.Guido van Rossum2003-02-271-6/+6
|
* - prefer "import ... as" to "import / (assignments) / del" for most thingsFred Drake2002-12-301-18/+11
| | | | | - when the thread module isn't available, subsequent attempts to import threading should not suceed
* Add __all__. (Brett Cannon.)Guido van Rossum2002-12-301-0/+2
|
* The _Event class should be more careful with releasing its lock whenGuido van Rossum2002-11-211-8/+14
| | | | | | | | 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.
* Docstring nits: The module is neither proposed nor new.Jeremy Hylton2002-08-141-1/+1
|
* Explain use of currentThread() in _Condition methods.Jeremy Hylton2002-08-141-2/+2
|
* Explain a little more.Jeremy Hylton2002-08-141-0/+1
|
* Explain a minor mystery.Jeremy Hylton2002-08-141-0/+1
|
* Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i)Raymond Hettinger2002-06-301-2/+1
|
* Partial introduction of bools where appropriate.Guido van Rossum2002-04-071-19/+19
|
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-2/+2
|
* SF #515023. Make _DummyThread.join() signature match base class (Thread)Neal Norwitz2002-02-191-1/+1
|
* Thread.__bootstrap(): ignore exceptions in the self.__delete() call inGuido van Rossum2001-12-281-1/+4
| | | | | | | | | | | | 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!
* Whitespace normalization.Tim Peters2001-09-181-4/+4
|
* Patch #428326: New class threading.Timer.Martin v. Löwis2001-09-051-1/+30
|
* Added new BoundedSemaphore class. Closes bug 452836.Skip Montanaro2001-08-201-0/+15
|
* of course I muffed it separating the notes code from the initial_valueSkip Montanaro2001-08-191-4/+4
| | | | code. grrr...
* add debug calls to self._note for the Semaphore class. This closes bugSkip Montanaro2001-08-191-0/+9
| | | | | 443614. I will submit a new feature request and patch to threading.py and libthreading.tex to address the bounded semaphore issue.
* Remove unused imports (PyChecker)Andrew M. Kuchling2001-08-131-4/+0
|
* _Condition.wait(): never sleep longer than the timeout time remaining,Tim Peters2001-08-121-4/+11
| | | | | and even if we have a long time left to wait, try the lock at least 20 times/second.
* SF bug [#410708] Condition.wait() and KeyboardInterrupt.Tim Peters2001-04-021-23/+25
| | | | | | http://sourceforge.net/tracker/?func=detail&aid=410708&group_id=5470&atid=105470 Added try/finally around Condition.wait() guts, so that the lock state gets restored at the end no matter what happens.
* Whitespace normalization.Tim Peters2001-01-151-3/+3
|
* Comment out a debugging print statement that triggered a complaint inGuido van Rossum2000-12-151-1/+1
| | | | c.l.py.
* Revise to use atexit instead of monkeying with sys.exitfunc directly.Fred Drake2000-08-181-9/+2
|
* patch from Charles Waldman--Jeremy Hylton2000-06-011-0/+1
| | | | define ThreadError (== thread.error); docs should be updated, too
* Fix a typo in a commentAndrew M. Kuchling2000-02-291-1/+1
|
* The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum2000-02-041-2/+1
| | | | | | | | The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Duncan Grisby noted a typo in _DummyThread.Guido van Rossum1999-09-291-1/+1
|
* Get rid of tabnanny's last complaints.Guido van Rossum1998-06-091-3/+3
|
* Two places where _time() should be used said time.time(), whichGuido van Rossum1998-05-291-2/+2
| | | | doesn't work of course.
* Use random instead of whrandom.Guido van Rossum1998-05-201-2/+2
|
* New Java-style threading module. The doc strings are in a separate module.Guido van Rossum1998-04-091-0/+638