Comments (5)
Remarks:
Since LatentActionManager is processed in the order of registration, the problem seems to be caused by the fact that the resumption process of the external coroutine is not called until the next frame after the internal coroutine has finished.
WhenAll, WhenAny, etc. were registered and processed after the internal coroutine, so they behaved as intended.
from ue5coro.
This behavior is by design and documented. Latent coroutines are fundamentally owned and controlled by the latent action manager and can only complete when it processes them on its own tick. This matches BP and most existing Latent
UFUNCTIONs from the engine, which is the primary focus of this mode of execution.
In some situations that I encountered, I managed to skip the extra tick by return
ing an inner TCoroutine instead of co_awaiting it.
from ue5coro.
Thank you for your response,
Sorry for the inconvenience,
In some situations that I encountered, I managed to skip the extra tick by returning an inner TCoroutine instead of co_awaiting it.
If you don't mind, I would appreciate it if you could tell me what exactly you did in response.
from ue5coro.
@aziogroup Instead of
TCoroutine<> Fn1();
TCoroutine<> Fn2()
{
DoStuff();
co_await Fn1();
}
it's
TCoroutine<> Fn1();
TCoroutine<> Fn2()
{
DoStuff();
return Fn1();
}
from ue5coro.
Thank you very much!
It seemed difficult to apply it to my case, but in a simple case this seemed to be the way to get around it.
from ue5coro.
Related Issues (20)
- Event-driven corotines HOT 3
- [Question] About TCoroutine lifetime HOT 1
- Compile error : A coroutine cannot have a return type containing 'auto' HOT 2
- failed to compile "DoTests" in file DelegateAwaiterTest.cpp HOT 8
- Live coding breaks generators HOT 2
- Compile error? HOT 7
- 发布安卓报错 HOT 1
- Is it dangerous for the UObject to be destroyed without canceling the coroutine? HOT 2
- Latent Coroutine Resumes for Unloaded Streamed Actor, Crash HOT 5
- [Question] TPromise Example HOT 1
- SIGSEGV: invalid attempt to access memory at address 0x0 HOT 2
- Latent Coroutine Crash On Exiting Game - Repro included HOT 8
- Coroutine crash when opening or leaving level in editor (game not running) HOT 1
- Canceling Nested Latent Awaiters HOT 3
- How to cancel TCoroutine<> if its already running HOT 1
- Build crashes with "Exceptions are not supported" HOT 4
- Return values from coroutines HOT 3
- Coroutine awaiting another coroutine HOT 2
- co_await Promise.GetFuture(); crash HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ue5coro.