On Dec 14, 2007 2:15 PM, Rob Heittman <[EMAIL PROTECTED]> wrote:

> Did we ever come up with a definitive list of which high level Restlet
> objects are expected to be thread-safe and which are not?  I thought so, but
> could not find it on the list.  I wanted to add some JCIP concurrency
> annotations to some of our code base and wanted to make sure I was
> expressing the correct policies on Applications, Resources, Guards, Routers,
> Filters, and generic Restlets.
>

Restlet and all classes in the framework that extend it, directly or
indirectly, need to be thread-safe because any instance of Restlet is
potentially accessed by multiple threads. There are some outstanding issues
in the code base, see
http://restlet.tigris.org/issues/show_bug.cgi?id=368for details and
links. For example, Restlet itself is technically broken
because the context field is accessed without appropriate synchronization.

In "normal" use, a Resource does not have to be thread-safe because it is
confined to a single thread, but John Fallows' recent proposal (
http://restlet.tigris.org/servlets/ReadMsg?list=discuss&msgNo=3699) could
change that.

--tim

Reply via email to