Got asked an interesting question by @matt77hias about why enkiTS doesn't use std::future in the API and I think my answer might be worth sharing:https://github.com/dougbinks/enkiTS/issues/27 …
The other solution is to reschedule the task, depending on how early the wait is in the task. Ideally you just don't schedule the task until it would not be blocked (execution graphs basically do this), but that's not always possible (ie, waiting on the GPU).
-
-
As a last ditch effort, wait-with-assist is your only option. I have two places in my game engine where this *must* happen. I could probably get rid of them, but it'd be too much change to the engine at this time. Picking my battles.
-
Thanks - that's an excellent explication and the deadlock you mention is certainly an issue. Task waiting in enkiTS is intended to be used by the task which spawns the task waited on, but that needs better documentation on avoiding deadlocks and how to implement alternatives.
- Näytä vastaukset
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.