Closed bakwc closed 2 years ago
It's impossible to take lock in a custom thread without this fix. Now I can do:
viewer = None
def my_thread():
global viewer
while True:
if viewer is None:
time.sleep(0.1)
continue
viewer.render_lock.acquire()
// MyCode
scene.set_pose(points_node, obj_pos)
viewer.render_lock.release()
time.sleep(0.05)
def createRunViewer():
global viewer
viewer = Viewer(scene, auto_start=False, viewport_size=(1200, 1200))
viewer.start()
thr = threading.Thread(target=my_thread)
thr.start()
createRunViewer()
Ability to disable auto-start, workaround for running rendering in a custom thread: #27, #11