Tuesday, October 7, 2008

Thread-safe simple lifecycle (part 2)

After last post, there are some issues that remain open:
  • Do clients need to know about transient states? After all, in our multithreaded environment we only want to know if the service provided by the active object is ready to be used or not, regardless of which thread's start command did the trick.
  • What happens if we stop the object while there are in-flight requests that depend on the ON state (such as a resource disposed after a stop command)? Can we provide deterministic behaviors for these cases? Can we provide them minimizing synchronized regions and contention?
Stay tuned.

No comments: