Boris Kolpackov-2 wrote:
> 
> Hi Daniel,
> 
> That would be the easiest way. Another alternative would be to have an
> upgradable rw mutex corresponding to the XMLGrammarPool instance. When
> starting the parsing process in a thread you would read-lock this mutex.
> If the entity resolver is called during parsing to resolve the schema
> (that is, a cache miss) then you would relock the mutex to write-lock
> before returning the schema. This will ensure that the parser invocation
> which adds the schema to the pool uses the pool exclusively. Then when
> the parser returns you release the lock. I think this will work.
> 

I tried messing with this today and got a bit lost with the mutexes, it
works but I can't be sure that it'll work in every scenario. Can you write a
small piece of code explaining exactly what you meant?

Thanks
-- 
View this message in context: 
http://www.nabble.com/XMLGrammarPool-issues-tp16851037p16910504.html
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to