summaryrefslogtreecommitdiff
path: root/Modules/threadmodule.c
AgeCommit message (Collapse)AuthorLines
2006-04-12remove forward declarations, move constructor functions. makes code C++ safe.Anthony Baxter-43/+42
2006-03-30Remove unnecessary casts from type object initializers.Georg Brandl-18/+18
2006-03-10Um, I thought I'd already checked this in.Guido van Rossum-27/+4
Anyway, this is the changes to the with-statement so that __exit__ must return a true value in order for a pending exception to be ignored. The PEP (343) is already updated.
2006-03-08typoGeorg Brandl-1/+1
2006-02-28Updates to the with-statement:Guido van Rossum-0/+36
- New semantics for __exit__() -- it must re-raise the exception if type is not None; the with-statement itself doesn't do this. (See the updated PEP for motivation.) - Added context managers to: - file - thread.LockType - threading.{Lock,RLock,Condition,Semaphore,BoundedSemaphore} - decimal.Context - Added contextlib.py, which defines @contextmanager, nested(), closing(). - Unit tests all around; bot no docs yet.
2006-01-19Check return result from Py_InitModule*(). This API can fail.Neal Norwitz-0/+2
Probably should be backported.
2005-06-20Fix bug:Michael W. Hudson-3/+6
[ 1163563 ] Sub threads execute in restricted mode basically by fixing bug 1010677 in a non-broken way. Backport candidate.
2005-06-15Consistently use hard tabs for indentation.Michael W. Hudson-159/+152
Slightly de-Fultonize two bits of C layout. No semantic changes.
2005-06-15Add a missing incref.Michael W. Hudson-0/+1
Backport candidate.
2005-06-02Delete some vestigial code; execution will never reach the 'if' statement if ↵Andrew M. Kuchling-6/+1
args is NULL
2005-02-20The error message "can't start new thread" should not end in aGuido van Rossum-1/+1
newline.
2004-08-24Fix for [ 1010677 ] thread Module Breaks PyGILState_Ensure(),Mark Hammond-5/+3
and a test case. When booting a new thread, use the PyGILState API to manage the GIL.
2004-07-14Implemented thread-local data as proposed on python-dev:Jim Fulton-0/+260
http://mail.python.org/pipermail/python-dev/2004-June/045785.html
2004-03-24Changed random calls to PyThreadState_Get() to use the macroNicholas Bastin-1/+1
2003-06-16Correct function name.Kurt B. Kaiser-3/+3
2003-06-13Add interrupt_main() to thread module.Kurt B. Kaiser-0/+17
2003-04-29When an unhandled exception happens, report the repr() of the functionGuido van Rossum-5/+13
that was used to start the thread. This is useful to track down the source of the problem when there is no traceback, as can happen when a daemon thread gets to run after Python is finialized (a new kind of event, somehow this is now possible due to changes in Py_Finalize()).
2002-09-05--with(out)-thread is deprecated according to configure --helpNeal Norwitz-1/+1
2002-08-02Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond-1/+1
for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
2002-07-17staticforward bites the dust.Jeremy Hylton-1/+1
The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) I'm leaving staticforward and statichere defined in object.h as static. This is only for backwards compatibility with C extensions that might still use it. XXX I haven't updated the documentation.
2002-06-13Patch #568124: Add doc string macros.Martin v. Löwis-18/+18
2002-04-07Lock methods acquire() and locked() now return bools.Guido van Rossum-7/+7
2002-03-31Remove METH_OLDARGS:Neal Norwitz-11/+8
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple Convert METH_OLDARGS -> METH_NOARGS: remove args parameter Please review. All tests pass, but some modules don't have tests. I spot checked various functions to try to make sure nothing broke.
2002-03-26Missed change METH_OLDARGS to METH_NOARGS for two aliased functionsNeal Norwitz-2/+2
2002-03-25Missed change METH_OLDARGS to METH_NOARGS for two aliased functionsNeal Norwitz-2/+2
2002-03-25Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.Neal Norwitz-22/+10
2001-12-08Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum-1/+1
type.__module__ behavior. This adds the module name and a dot in front of the type name in every type object initializer, except for built-in types (and those that already had this). Note that it touches lots of Mac modules -- I have no way to test these but the changes look right. Apologies if they're not. This also touches the weakref docs, which contains a sample type object initializer. It also touches the mmap test output, because the mmap type's repr is included in that output. It touches object.h to put the correct description in a comment.
2001-10-16Partial patch from SF #452266, by Jason Petrone.Guido van Rossum-9/+10
This changes Pythread_start_thread() to return the thread ID, or -1 for an error. (It's technically an incompatible API change, but I doubt anyone calls it.)
2001-10-05Fix typo in docstringAndrew M. Kuchling-1/+1
2001-01-23Use PyThreadState_DeleteCurrent() instead of PyThreadState_Delete()Guido van Rossum-2/+1
and PyEval_ReleaseThread(). This fixes SF bug #125673 PyThreadState_Delete: invalid tstate (Unix only?).
2000-10-20t_bootstram(): Use PySys_WriteStderr() instead of fprintf(stderr,...).Fred Drake-1/+1
This closes bug #117324.
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-09-01The second argument to start_new_thread() is not a tuple, as pointedGuido van Rossum-2/+2
out by Curtis Jensen on c.l.py and forwarded by Fredrik Lundh.
2000-08-03Use METH_OLDARGS instead of numeric constant 0 in method def. tablesAndrew M. Kuchling-16/+22
2000-08-03Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling-2/+4
2000-07-21Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters-2/+2
and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
2000-07-10ANSI-ficationPeter Schneider-Kamp-31/+11
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-05-03Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum-3/+3
For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
2000-02-29Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum-1/+1
PyArg_ParseTuple() format string arguments as possible.
1998-12-21Thanks to Chris Herborth, the thread primitives now have proper Py*Guido van Rossum-43/+36
names in the source code (they already had those for the linker, through some smart macros; but the source still had the old, un-Py names).
1998-12-04Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum-1/+1
on BeOS or Windows.
1998-10-07Make gcc -Wall happy:Guido van Rossum-12/+0
Remove unused decls of getloclock() and is_lockobject().
1998-10-01Renamed thread.h to pythread.h.Guido van Rossum-1/+1
1998-08-04Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum-1/+8
1998-06-27# Remove an extra blank line from a doc string.Guido van Rossum-1/+0
1998-06-27Added doc strings. Also export LockType from the modoule, and give itGuido van Rossum-15/+102
a doc string.
1998-05-28t_bootstrap(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).Fred Drake-1/+1
1998-02-06Don't store the exception info from an unhandled exception in a threadGuido van Rossum-1/+1
in sys.last_*; it prevents proper calling of destructors of local variables.