Calling createNode() from a worker thread, while cooking, will randomly stall Houdini's main thread.
The setup:
- some HDA will request a cook on a node.
- out cook_manager will accomodate, from it's own thread with :
#set all display-flag except target node's
CleanDisplayFlagExcept(node)
#get display interface
node.displayNode().cook(force=True)
#make a end-of-cook callback
cook_done = asyncio.Event()
def cook_done_lambda(): cook_done.set()
#trigger cook
hou.ui.addTriggerUpdateCallback(cook_done_lambda)
hou.ui.triggerUpdate()
#wait on for cook to end
await cook_done.wait()
#create a bunch of nodes for some reason
for i in range(0, 1024):
result = await self._asyncio_loop.run_in_executor(None, CreateNode, ("xyz", str(i)))
Meaning I can see the cook is still running but the TriggerUpdateCallback was called ?!
It is always at that moment that I see Houdini's mainthread and my worker thread stall, on a call to node.createNode()
Any hint or advise will be greatly appreciated. This is a blocker
See call stack in attachment.
Thank you
Francois