File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2707,9 +2707,7 @@ PyEval_SetTraceAllThreads(Py_tracefunc func, PyObject *arg)
2707
2707
2708
2708
_PyObjectQueue * queue = NULL ;
2709
2709
2710
- _PyMutex_lock (& _PyRuntime .stoptheworld_mutex );
2711
2710
_PyRuntimeState_StopTheWorld (& _PyRuntime );
2712
-
2713
2711
HEAD_LOCK (runtime );
2714
2712
PyThreadState * ts = PyInterpreterState_ThreadHead (interp );
2715
2713
while (ts ) {
@@ -2720,9 +2718,7 @@ PyEval_SetTraceAllThreads(Py_tracefunc func, PyObject *arg)
2720
2718
ts = PyThreadState_Next (ts );
2721
2719
}
2722
2720
HEAD_UNLOCK (runtime );
2723
-
2724
2721
_PyRuntimeState_StartTheWorld (& _PyRuntime );
2725
- _PyMutex_unlock (& _PyRuntime .stoptheworld_mutex );
2726
2722
2727
2723
PyObject * old_traceobj ;
2728
2724
_PyObjectQueue_ForEach (& queue , old_traceobj ) {
Original file line number Diff line number Diff line change @@ -1764,6 +1764,7 @@ _PyThread_CurrentFrames(void)
1764
1764
* need to grab head_mutex for the duration.
1765
1765
*/
1766
1766
_PyRuntimeState * runtime = tstate -> interp -> runtime ;
1767
+ _PyRuntimeState_StopTheWorld (runtime );
1767
1768
HEAD_LOCK (runtime );
1768
1769
PyInterpreterState * i ;
1769
1770
for (i = runtime -> interpreters .head ; i != NULL ; i = i -> next ) {
@@ -1797,6 +1798,7 @@ _PyThread_CurrentFrames(void)
1797
1798
1798
1799
done :
1799
1800
HEAD_UNLOCK (runtime );
1801
+ _PyRuntimeState_StartTheWorld (runtime );
1800
1802
return result ;
1801
1803
}
1802
1804
@@ -1823,6 +1825,7 @@ _PyThread_CurrentExceptions(void)
1823
1825
* need to grab head_mutex for the duration.
1824
1826
*/
1825
1827
_PyRuntimeState * runtime = tstate -> interp -> runtime ;
1828
+ _PyRuntimeState_StopTheWorld (runtime );
1826
1829
HEAD_LOCK (runtime );
1827
1830
PyInterpreterState * i ;
1828
1831
for (i = runtime -> interpreters .head ; i != NULL ; i = i -> next ) {
@@ -1856,6 +1859,7 @@ _PyThread_CurrentExceptions(void)
1856
1859
1857
1860
done :
1858
1861
HEAD_UNLOCK (runtime );
1862
+ _PyRuntimeState_StartTheWorld (runtime );
1859
1863
return result ;
1860
1864
}
1861
1865
You can’t perform that action at this time.
0 commit comments