Are RPC procedure re-entrant?

I’m wondering if RPC calls (for example Server RPCs) are automatically re-entrant. To clarify, if I have overlapping RPC calls to the same function from either multiple clients or the same client, will the Unreal automatically put the calls into some sort of a wait queue to ensure that multiple instances of the function are not run simultaneously? Or do I have to ensure this manually (for example by using a Wait Handle, mutex, or similar?

If you set them to “reliable” whey will be in a queue where all subsequent RPC executions are suspended until the current RPC is acknowledged. If not (reliable) they can even be ignored.

For additional information here is the documentation.

Generally all gameplay code can be considered single threaded. Ticks and RPCs are all queued and executed one after another, in the “game thread”, every frame. If your functions are synchronous, nothing to worry about. Now if you add async stuff (like AsyncLoadAsset), or timers/delays, your “functions” will span over multiple frames and you’ll have to prevent re-entrancy yourself, but everything’s still executed on the Game thread so it generally it only requires simple boolean check or blueprint Gate. Real concurrency stuff like mutex are only necessary if you do multi-threaded stuff yourself or use async APIs with callbacks that are not on the game thread.

Thanks a lot. That clears things up.