summaryrefslogtreecommitdiffstats
path: root/Modules/threadmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert revisions:Tim Peters2006-06-041-48/+0
| | | | | | | | | | | | | | | | 46640 Patch #1454481: Make thread stack size runtime tunable. 46647 Markup fix The first is causing many buildbots to fail test runs, and there are multiple causes with seemingly no immediate prospects for repairing them. See python-dev discussion. Note that a branch can (and should) be created for resolving these problems, like svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH followed by merging rev 46647 to the new branch.
* Patch #1454481: Make thread stack size runtime tunable.Andrew MacIntyre2006-06-041-0/+48
|
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-1/+2
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* Get rid of __context__, per the latest changes to PEP 343 and python-devGuido van Rossum2006-05-021-9/+0
| | | | | | | | discussion. There are two places of documentation that still mention __context__: Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without spending a whole lot of time thinking about it; and whatsnew, which Andrew usually likes to change himself.
* remove forward declarations, move constructor functions. makes code C++ safe.Anthony Baxter2006-04-121-43/+42
|
* Remove unnecessary casts from type object initializers.Georg Brandl2006-03-301-18/+18
|
* Um, I thought I'd already checked this in.Guido van Rossum2006-03-101-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.
* typoGeorg Brandl2006-03-081-1/+1
|
* Updates to the with-statement:Guido van Rossum2006-02-281-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.
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Fix bug:Michael W. Hudson2005-06-201-3/+6
| | | | | | | | [ 1163563 ] Sub threads execute in restricted mode basically by fixing bug 1010677 in a non-broken way. Backport candidate.
* Consistently use hard tabs for indentation.Michael W. Hudson2005-06-151-172/+165
| | | | | | Slightly de-Fultonize two bits of C layout. No semantic changes.
* Add a missing incref.Michael W. Hudson2005-06-151-0/+1
| | | | Backport candidate.
* Delete some vestigial code; execution will never reach the 'if' statement if ↵Andrew M. Kuchling2005-06-021-6/+1
| | | | args is NULL
* The error message "can't start new thread" should not end in aGuido van Rossum2005-02-201-1/+1
| | | | newline.
* Fix for [ 1010677 ] thread Module Breaks PyGILState_Ensure(),Mark Hammond2004-08-241-5/+3
| | | | | and a test case. When booting a new thread, use the PyGILState API to manage the GIL.
* Implemented thread-local data as proposed on python-dev:Jim Fulton2004-07-141-0/+260
| | | | http://mail.python.org/pipermail/python-dev/2004-June/045785.html
* Changed random calls to PyThreadState_Get() to use the macroNicholas Bastin2004-03-241-1/+1
|
* Correct function name.Kurt B. Kaiser2003-06-161-3/+3
|
* Add interrupt_main() to thread module.Kurt B. Kaiser2003-06-131-0/+17
|
* When an unhandled exception happens, report the repr() of the functionGuido van Rossum2003-04-291-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()).
* --with(out)-thread is deprecated according to configure --helpNeal Norwitz2002-09-051-1/+1
|
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* staticforward bites the dust.Jeremy Hylton2002-07-171-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.
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-18/+18
|
* Lock methods acquire() and locked() now return bools.Guido van Rossum2002-04-071-7/+7
|
* Remove METH_OLDARGS:Neal Norwitz2002-03-311-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.
* Missed change METH_OLDARGS to METH_NOARGS for two aliased functionsNeal Norwitz2002-03-261-2/+2
|
* Missed change METH_OLDARGS to METH_NOARGS for two aliased functionsNeal Norwitz2002-03-251-2/+2
|
* Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.Neal Norwitz2002-03-251-22/+10
|
* Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum2001-12-081-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.
* Partial patch from SF #452266, by Jason Petrone.Guido van Rossum2001-10-161-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.)
* Fix typo in docstringAndrew M. Kuchling2001-10-051-1/+1
|
* Use PyThreadState_DeleteCurrent() instead of PyThreadState_Delete()Guido van Rossum2001-01-231-2/+1
| | | | | | | and PyEval_ReleaseThread(). This fixes SF bug #125673 PyThreadState_Delete: invalid tstate (Unix only?).
* t_bootstram(): Use PySys_WriteStderr() instead of fprintf(stderr,...).Fred Drake2000-10-201-1/+1
| | | | This closes bug #117324.
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* The second argument to start_new_thread() is not a tuple, as pointedGuido van Rossum2000-09-011-2/+2
| | | | out by Curtis Jensen on c.l.py and forwarded by Fredrik Lundh.
* Use METH_OLDARGS instead of numeric constant 0 in method def. tablesAndrew M. Kuchling2000-08-031-16/+22
|
* Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling2000-08-031-2/+4
|
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-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 ;)
* ANSI-ficationPeter Schneider-Kamp2000-07-101-31/+11
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-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.)
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-291-1/+1
| | | | PyArg_ParseTuple() format string arguments as possible.
* Thanks to Chris Herborth, the thread primitives now have proper Py*Guido van Rossum1998-12-211-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).
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Make gcc -Wall happy:Guido van Rossum1998-10-071-12/+0
| | | | Remove unused decls of getloclock() and is_lockobject().
* Renamed thread.h to pythread.h.Guido van Rossum1998-10-011-1/+1
|
* Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum1998-08-041-1/+8
|