bugs.python.org

Issue684256

Created on 2003-02-10 23:02 by mhammond, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
auto_thread_state.patch mhammond, 2003-04-19 02:34 Remove warning on Linux
Messages (5)
msg42803 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2003-02-10 23:02
An implementation of the AutoThreadState API, mainly
for discussion purposes at this point.  To be a PEP soon.
msg42804 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2003-02-13 13:05
Logged In: YES
user_id=14198
Attaching a new patch that works perfectly.  2 checks remain
in the code that will be debug only, but apart from that, it
is pretty good.  No changes at all to existing semantics.
Tested on Linux and Windows.
msg42805 - (view) Author: Greg Chapman (glchapman) Date: 2003-03-04 17:44
Logged In: YES
user_id=86307
It appears to me that PyAutoThreadState_Release calls
PyThreadState_Clear after releasing the GIL (if the thread
state was created by PyAutoThreadState_Ensure, then old
state will be UNLOCKED, so PyEval_ReleaseThread will be
called).  It looks to me that, if the thread state is going to be
deleted, the call to Clear it should be moved up to just before
ReleaseThread, i.e.:
if (oldstate == PyAutoThreadState_UNLOCKED) {
    if (tcur->autothreadstate_counter == 1)
        PyThreadState_Clear(tcur);
    PyEval_ReleaseThread(tcur);
}
msg42806 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2003-04-19 01:47
Logged In: YES
user_id=14198
Attaching a new patch.  This corrects the clearing of the
threadstate, and uses the new names PyGILState_*.
msg42807 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2003-04-19 15:45
Logged In: YES
user_id=14198
Checking in Include/pystate.h;
new revision: 2.24; previous revision: 2.23
Checking in Include/pythread.h;
new revision: 2.21; previous revision: 2.20
Checking in Lib/test/test_capi.py;
new revision: 1.5; previous revision: 1.4
Checking in Modules/_testcapimodule.c;
new revision: 1.22; previous revision: 1.21
Checking in Modules/posixmodule.c;
new revision: 2.295; previous revision: 2.294
Checking in Python/ceval.c;
new revision: 2.359; previous revision: 2.358
Checking in Python/pystate.c;
new revision: 2.26; previous revision: 2.25
Checking in Python/pythonrun.c;
new revision: 2.191; previous revision: 2.190
Checking in Python/thread.c;
new revision: 2.46; previous revision: 2.45
Checking in Python/thread_sgi.h;
new revision: 2.17; previous revision: 2.16
History
Date User Action Args
2022-04-10 16:06:42adminsetgithub: 37959
2003-02-10 23:02:08mhammondcreate

Read the original on bugs.python.org ↗