Thanks JCW! I'm glad I asked, 'cause..:

For those of you on this list that use e4Graph, I actually implemented a
similar mechanism to what JCW describes in mk4tcl, so that its safe to
reopen the storage. All storages are opened shared by default, so no
special flag is needed, in e4Graph. I originally implemented this as an
optimization, just wanting to save file descriptors etc. I did not know it
was actually *required* :)

Of course this only helps for the in-process case when one process opens a
storage multiple times. No solution yet for the multi-process case.

--JYL

> Jacob Levy wrote:
>
>> Is it a problem when one process opens the same storage several times
>> or
>> is it only a problem when more than one process opens the same
>> storage?
>
> Any scenario, whether in-process or multi-process.  Each open db has
> its own cache, which gets out of sync when changed underneath it.  Open
> a storage once, use it within a single thread.
>
> In Mk4tcl, there's a global mutex, so there you can open a storage once
> with the "-shared" flag and use it in multiple interpreters and threads.
>
> For every other scenario: use a client/server approach.
>
> -jcw
>
> _______________________________________________
> metakit mailing list  -  [EMAIL PROTECTED]
> http://www.equi4.com/mailman/listinfo/metakit



_______________________________________________
metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to