rolandweber / Pityoulish

A collection of programming/debugging exercises to support a course on Distributed Systems.
Creative Commons Zero v1.0 Universal
7 stars 0 forks source link

Thread safety for MessageBoard implementations #102

Closed rolandweber closed 4 years ago

rolandweber commented 4 years ago

With #97, I want to use the same MessageBoard object for different access protocols. This requires new provisions for thread safety. Up until now, the sockets server was single-threaded, and the Java RMI server synchronized in the remote objects.

Implement a synchronization wrapper, similar to Collections.synchronizedList()?

rolandweber commented 4 years ago

The TicketManager is defined to be thread safe. So only the MessageBoard needs extra handling for thread safety.