MCPcopy Index your code
hub / github.com/RustPython/RustPython / run

Method run

Lib/test/test_queue.py:33–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 threading.Thread.__init__(self)
32
33 def run(self):
34 # The sleep isn't necessary, but is intended to give the blocking
35 # function in the main thread a chance at actually blocking before
36 # we unclog it. But if the sleep is longer than the timeout-based
37 # tests wait in their blocking functions, those tests will fail.
38 # So we give them much longer timeout values compared to the
39 # sleep here (I aimed at 10 seconds for blocking functions --
40 # they should never actually wait that long - they should make
41 # progress as soon as we call self.fn()).
42 time.sleep(0.1)
43 self.startedEvent.set()
44 self.fn(*self.args)
45
46
47# Execute a function that blocks, and in a separate thread, a function that

Callers

nothing calls this directly

Calls 3

sleepMethod · 0.45
setMethod · 0.45
fnMethod · 0.45

Tested by

no test coverage detected