mercredi 23 novembre 2016

How can I notify my user that a read hasn't been completed yet?

I have a class that encapsulates all the business logic related to using Asio to read and write to a generic stream socket. I'd like to add a flag so my users know if they can retrieve data from a getter or whether we're still waiting for the backend.

How is this normally done? Set a flag to busy after the write and do the read in the background in a separate thread? The flag would be something similar to PQisBusy

Aucun commentaire:

Enregistrer un commentaire