e2366e9102e6862416bf998af52baaa5e9c0a31b,tests/python/unittest/test_thread_local.py,,test_name,#,88
Before Change
thread.start()
NameManager.current = NameManager()
NameManager.current.get(None, "main_thread")
event.set()
thread.join()
event.clear()
assert status[0], "Spawned thread isn"t using thread local NameManager"
After Change
assert "spawned_thread" in name_list[1]._counter, "cannot find the string `spawned thread` in name_list[1]._counter"
e1 = threading.Event()
e2 = threading.Event()
status = [False]
def g():
with mx.name.NameManager():
e2.set()
e1.wait()
if "main_thread" not in mx.name.current()._counter:
status[0] = True
thread = threading.Thread(target=g)
thread.start()
e2.wait()
with mx.name.NameManager():
mx.name.current().get(None, "main_thread")
e1.set()
thread.join()
e1.clear()
e2.clear()
assert status[0], "Spawned thread isn"t using thread local NameManager"
def test_blockscope():
class dummy_block:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: apache/incubator-mxnet
Commit Name: e2366e9102e6862416bf998af52baaa5e9c0a31b
Time: 2020-07-15
Author: lausen@amazon.com
File Name: tests/python/unittest/test_thread_local.py
Class Name:
Method Name: test_name
Project Name: apache/incubator-mxnet
Commit Name: e2366e9102e6862416bf998af52baaa5e9c0a31b
Time: 2020-07-15
Author: lausen@amazon.com
File Name: tests/python/unittest/test_thread_local.py
Class Name:
Method Name: test_attrscope
Project Name: apache/incubator-mxnet
Commit Name: e2366e9102e6862416bf998af52baaa5e9c0a31b
Time: 2020-07-15
Author: lausen@amazon.com
File Name: tests/python/unittest/test_thread_local.py
Class Name:
Method Name: test_context