This happens only in release build, with or without a debugger attached. If a thread uses SwitchToThread to wait for one of the additional associated threads to accomplish some work, the process might deadlock.īut looking at current threads spawn by process they are not more than usual. If the maximum number of threads is already running, no additional associated thread can run until a running thread finishes. For example, an I/O completion port or thread pool limits the number of associated threads that can run. Note that the operating system will not switch to a thread that is being prevented from running only by concurrency control. So when some sound source is cloned inside the hierarchy.īut sometimes it stalls in other callstack, but always when on that SwitchToThread: I clone them only in the main thread but then for some node hierarchy I got Ungine deadlocking (just stalling the main thread) here: The lock/unlock are my own locks so I can access in thread-safe manner the array holding nodes that were just streamed in. Node->clone() // This is where I got a deadlock The bankers algorithm is a resource allocation and deadlock avoidance algorithm that simulates resource allocation for predetermined maximum possible amounts of all resources before performing an 's-state' check to look for potential activities and determining whether allocation should be permitted to continue. Take and remove a node from _pendingNodes Callback to be called in a background thread when node is ready: I am using AsyncQueue (in Unigine 2.13.0.1) to trigger streaming of some node hierarchies, wait for it to finish in my callback, call takeNode and then in the next main thread frame do a node clone:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |