I'm still relatively new to C#/Unity but does anyone else think async/await is really harmful in games? Is it just me? (cc @kurtismcc )
Yeh, if finding your target really is an operation that needs to be split over multiple frames, in a traditional state machine, wouldn't you need to store the target in a member variable? And therefore wouldn't it be vulnerable to identical failure conditions?
-
-
The point is in a traditional state machine, it’s obvious when you abort, because you just don’t call advance. When that’s happening on another thread, you don’t know when it’s safe to tear down because you aren’t the thread calling advance() or idle() or whatever.
-
Do you need to worry about concurrency though? Async can be single threaded right?
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.