@scourge99991 (scourge99991) posted a new topic, subject "Blueprint events not reentrant?". It read:

   Ran into a nasty bug that i traced back to overlap events not being reentrant.
    
    I was handling overlap events and performing logic based on the “other actor” parameter that is passed in. Before the 1st overlap event could complete another overlap event was triggered. This had the effect of overwriting the “other actor” parameter for the 1st event such that when execution switched back to the 1st event it was now using the 2nd event's “other actor”.
    
    is this normal behavior that events are not reentrant? is there some mechanism or tool like mutexs which can be used to solve this problem? Or some way to make certain events reentrant?
    
    My current workaround is to set a flag to ignore overlap events until the 1st overlap event is completely handled. But that's not a perfect solution.

Then @ClockworkOcean (ClockworkOcean) said

    Each ‘chain' of BP code will execute in one frame, unless you use latency ( like a delay node, or any node with the little clock top right-hand corner ).
    
    So the ‘other actor' reference will be valid for the whole chain of nodes, during that frame.
    
    Obviously, it's a good idea to get that reference out into another variable or array, if you're anticipating a high volume of overlaps.

So @scourge99991 (scourge99991) replied

    > Each ‘chain' of BP code will execute in one frame, unless you use latency ( like a delay node, or any node with the little clock top right-hand corner ).
    
    Good to know. thanks.
    
    > So the ‘other actor' reference will be valid for the whole chain of nodes, during that frame.
    
    I call other events when handling the overlap event. So i suspect that causes the execution to be broken into multiple frames.
    
    > Obviously, it's a good idea to get that reference out into another variable or array, if you're anticipating a high volume of overlaps.
    
    Is there some standard practice or framework already in place to do this? First thing that comes to mind is push them to a queue (or array like you suggest). Seems like a pain to have to plan and mitigate reentrancy problems for every single event with a queue. Just ignoring it until its a problem seems like a bad idea because this sort of issue manifests in weird ways.

To which @ClockworkOcean (ClockworkOcean) replied

    You have to manage it, I'm afraid.
    
    If you think down the line a little, expecting everything to be re-entrant would lead to many absurd situations


{'source': 'discourse', 'url': 'https://forums.unrealengine.com/t/blueprint-events-not-reentrant/646736', 'title': 'Blueprint events not reentrant?', 'views': 92, 'has_accepted_answer': True, 'word_count': 405, 'like_count': 2, 'reply_count': 2, 'participant_count': 2, 'posts': 4, 'tags': 'question Blueprint UE4-27', 'author': '@scourge99991 (scourge99991)', 'participants': '@scourge99991 (scourge99991), @ClockworkOcean (ClockworkOcean)', 'image_url': [None], 'created_at': '2022-09-12T08:25:58.480Z', 'last_posted_at': '2022-09-12T17:07:31.299Z'}