Skip to content

Commit

Permalink
Skip test_cross_thread_use during leakchecks.
Browse files Browse the repository at this point in the history
The background thread is problematic.
  • Loading branch information
jamadden committed Jan 12, 2021
1 parent fb70b4a commit ca2de79
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gevent/tests/test__event.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def test_nonblocking_get(self):
self.assertRaises(gevent.Timeout, ar.get, block=False)
self.assertRaises(gevent.Timeout, ar.get_nowait)

@greentest.ignores_leakcheck
def test_cross_thread_use(self, timed_wait=False, wait_in_bg=False):
# Issue 1739.
# AsyncResult has *never* been thread safe, and using it from one
Expand Down Expand Up @@ -192,13 +193,15 @@ def work():
# This results in a separate code path
worker = gevent.spawn(work)
worker.join()
del worker
else:
work()

g_event.set()
glet.join()
del glet
self.finished_event.set()

gevent.get_hub().destroy(destroy_loop=True)

thread = Thread()
thread.start()
Expand Down

0 comments on commit ca2de79

Please sign in to comment.