e2366e9102e6862416bf998af52baaa5e9c0a31b,tests/python/unittest/test_thread_local.py,,test_context,#,30
Before Change
status[0] = True
thread = threading.Thread(target=g)
thread.start()
Context.default_ctx = Context("cpu", 11)
event.set()
thread.join()
event.clear()
assert status[0], "Spawned thread didn"t set the correct context"
After Change
thread = threading.Thread(target=g)
thread.start()
e2.wait()
with Context("cpu", 11):
e1.set()
thread.join()
e1.clear()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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_context
Project Name: hanxiao/bert-as-service
Commit Name: c818e844a3928f8c174015bd80cd5e41114da7d5
Time: 2018-11-11
Author: hanhxiao@tencent.com
File Name: utils/client.py
Class Name: EncoderClient
Method Name: __init__
Project Name: apache/incubator-mxnet
Commit Name: e2366e9102e6862416bf998af52baaa5e9c0a31b
Time: 2020-07-15
Author: lausen@amazon.com
File Name: python/mxnet/context.py
Class Name:
Method Name: