Can match state be accessed in parallel?

Hi!
Does the server order access to the match state objects?
For example, can be MatchJoinAttempt called in parallel for the same state object
or Nakama internally perform some sort of queuing?

1 Like

That’s a great question @2heavymental.

Internally Nakama sequences all executions that pass the match state into them. For example a match join attempt will be handled, followed by a match join, then the next match loop tick, etc, etc. You do not need to lock around the match state because changes will not be concurrently executed on it.

2 Likes

Excellent! It simplifies a lot of things. Maybe this is described somewhere in the documentation? It will be cool to see the complete picture.

@2heavymental It’s a good point. I’ll make a note about it for us to cover with our docs. :+1: