[Closed] Are delegates blocking or asynchronous?
Very basic question, as the title suggests: when I subscribe to a delegate via AddDynamic() and then call Broadcast() on it, does it process the event in a blocking fashion, or is it asynchronous?
So does Something() execute only after OnSquadLeaderChanged() has finished, or is another thread listening via Broadcast()?
I couldn't really find anything in the source code.
asked Jan 23 '18 at 03:06 PM in C++ Programming
The question has been closed Nov 02 '18 at 11:22 PM by GlassBeaver for the following reason:
The question is answered, right answer was accepted
The implementation of delegates is very complicated and is completed by UHT at compile-time. It looks like the event is sent to the registered UObject synchronously. I can't tell you 100% if it is complete synchronous, but it looks like that.
I also use delegates and didn't run into async problems, the always fire at the right time.
answered Jan 23 '18 at 04:07 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here