mwhicks-dev / splat-alpha

2D platforming game engine based in C++ and built on top of the SFML multimedia suite.
0 stars 0 forks source link

Add await function to Controller and Listener #46

Closed mwhicks-dev closed 5 months ago

mwhicks-dev commented 5 months ago

New function Controller::await(Request): Response will block on a Request instead of pushing it to the queue like usual.

New function Listener::await(Command): void will similarly block on a Command processing instead of pushing it.

These will be used when a response is needed from something immediately, such as if an UpdateAssetEvent needs to update something that has not yet been defined, or during client-server connection. If a function needs to see the result of a request, or needs to be sure that events were ran in sequence, it should use an await.