xaya / libxayagame

MIT License
21 stars 19 forks source link

Make SQLiteProcessor work asynchronously #128

Closed domob1812 closed 1 year ago

domob1812 commented 1 year ago

In #127, we have introduced a framework for processing game states, in particular hashing them for debugging purposes. For now, this processing runs synchronous to the main GSP operation; however, hashing of large game states can be quite expensive in terms of runtime, and it is not optimal to block the GSP completely during that operation.

The SQLiteProcessor class is already defined in a way that allows making it run asynchronous: The Compute method should use a read-only snapshot if possible (like RPC calls), so that the GSP can continue syncing while it is running.