diff options
Diffstat (limited to 'coverage/ctracer')
-rw-r--r-- | coverage/ctracer/tracer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/ctracer/tracer.c b/coverage/ctracer/tracer.c index 236fbbf..0ade741 100644 --- a/coverage/ctracer/tracer.c +++ b/coverage/ctracer/tracer.c @@ -1035,7 +1035,10 @@ static PyObject * CTracer_stop(CTracer *self, PyObject *args_unused) { if (self->started) { - PyEval_SetTrace(NULL, NULL); + /* Set the started flag only. The actual call to + PyEval_SetTrace(NULL, NULL) is delegated to the callback + itself to ensure that it called from the right thread. + */ self->started = FALSE; } |