This forum has been archived. Please start a new discussion on GitHub.

Stop Client Execution


I am new to ICE and threading. I have to create a client sever application where multiple clients use/update a shared data on the sever. I am trying to avoid a read of shared data by each client every time they want to use it.

So I will broadcast the shared data once updated by any client to all clients so that they have that value available. But I am not sure how can I make sure that every client has the most updated data at all times. Since there may be a case when one client is still updating while other is unaware of it and uses the most current data it has.

what I am wondering is, is there a way to lock all client from doing any task when the shared data is being updated.

-Thank you,


  • matthew
    matthew NL, Canada
    IceStorm has explicit support for shared state. Check the counter demo for an example of how to share state between multiple subscribers (demo/IceStorm/counter).

    I suspect, however, that your stated goal of "lock all client from doing any task when the shared data is being updated." is for all intents and purposes impossible. What would you do if the client starts a task and the server starts to update the shared data? Typically the best you can do is work on your now-current-view of the data, and then subsequently react to changes in the data.