No, that's not safe at all.... unless all the access is read-only.
alex
On Thu, Oct 22, 2009 at 7:36 AM, Chas Emerick <[email protected]> wrote:
> Alex,
>
> Thank you for the clarification. Just to make sure we're understanding
> each other, I'm actually asking about multiple readers, each opening and
> using their own RecordManagers. Your mention of synchronization leads me to
> think you're talking about multiple threads reading from a single
> RecordManager.
>
> Just FYI, I'm being careful here because I came across a mention of RM
> changing files on disk when *reading*, which surprised me (can't find the
> link right now)...
>
> Thanks again,
>
> - Chas
>
> On Oct 22, 2009, at 10:27 AM, Alex Boisvert wrote:
>
> Individual concurrent reads are safe. Pretty much everything is
> synchronized at the top of level.
>
> However, iterators / tuple browsers are unsafe under concurrent updates.
> You would have to synchronize on the RecordManager instance to maintain a
> consistent view while iterating.
>
> alex
>
>
> On Thu, Oct 22, 2009 at 5:10 AM, Chas Emerick <[email protected]>wrote:
>
>> I've been plumbing around the list archives for a while, but they're
>> something of a jumble (thanks, Sourceforge!), so I figured I'd open a
>> new thread to ask:
>>
>> What level of read concurrency does jdbm support?
>>
>> What seems clear is that, to be safe, there should only be one thread
>> writing to a jdbm database (although it appears that it is possible
>> for multiple threads to participate in a transaction, I'm perfectly
>> fine with serializing all write access). However, I came across at
>> least a number of comments that lead me to believe that concurrent
>> reads are unsafe as well, although they're all from pre-history (e.g.
>> 2001).
>>
>> Thanks,
>>
>> - Chas
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Jdbm-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jdbm-general
>>
>
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jdbm-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jdbm-general