MCPcopy Index your code
hub / github.com/pytorch/pytorch / testMultiThreaded

Method testMultiThreaded

caffe2/python/context_test.py:30–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 self._exceptions.append(e)
29
30 def testMultiThreaded(self):
31 threads = []
32 self._exceptions = []
33 for _ in range(8):
34 thread = Thread(target=self.use_my_context)
35 thread.start()
36 threads.append(thread)
37 for t in threads:
38 t.join()
39 for e in self._exceptions:
40 raise e
41
42 @MyContext()
43 def testDecorator(self):

Callers

nothing calls this directly

Calls 4

rangeFunction · 0.50
startMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected