You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by James M Snell <ja...@gmail.com> on 2006/09/13 23:16:36 UTC

FOM Interfaces and Thread Safety

Currently the FOM Interface are not threadsafe.  For instance, if
multiple threads try to call entry.setId(...) at the same time, it could
cause some rather interesting results.  However, synchronizing the
methods by default causes a very significant performance drop.  I
propose that we simply take it as a given that the FOM objects are not
threadsafe and that end developers, if they want to allow multiple
threads to modify individual FOM objects, they must provide the
necessary synchronization.

- James

Re: FOM Interfaces and Thread Safety

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 9/13/06, James M Snell <ja...@gmail.com> wrote:
> Currently the FOM Interface are not threadsafe.  For instance, if
> multiple threads try to call entry.setId(...) at the same time, it could
> cause some rather interesting results.  However, synchronizing the
> methods by default causes a very significant performance drop.  I
> propose that we simply take it as a given that the FOM objects are not
> threadsafe and that end developers, if they want to allow multiple
> threads to modify individual FOM objects, they must provide the
> necessary synchronization.

+1, synchronizing those objects seems like a horribly wasteful idea,
considering how seldom they are likely to be used from multiple
threads.

-garrett

Re: FOM Interfaces and Thread Safety

Posted by Stephen Duncan <st...@gmail.com>.
On 9/13/06, James M Snell <ja...@gmail.com> wrote:
> Currently the FOM Interface are not threadsafe.  For instance, if
> multiple threads try to call entry.setId(...) at the same time, it could
> cause some rather interesting results.  However, synchronizing the
> methods by default causes a very significant performance drop.  I
> propose that we simply take it as a given that the FOM objects are not
> threadsafe and that end developers, if they want to allow multiple
> threads to modify individual FOM objects, they must provide the
> necessary synchronization.
>
> - James
>

+1

-- 
Stephen Duncan Jr
www.stephenduncanjr.com