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?
Example:
DelegatesComponent->SquadLeaderChanged.AddDynamic(this, &USquadMembershipComponent::OnSquadLeaderChanged);
DelegatesComponent->SquadLeaderChanged.Broadcast(Squad->SquadLeader);
// IS THIS GUARANTEED TO EXECUTE ONLY AFTER OnSquadLeaderChanged HAS FINISHED?
Something();
void USquadMembershipComponent::OnSquadLeaderChanged(AActor* SquadLeader)
{
bSquadLeader = GetOwner() == SquadLeader;
}
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.