Hi James,
The GrammarPool itself is thread safe, but I don't think Grammar Objects themselves are.


I said this because the GrammarPool returns the "registered" Grammar object ( I believe), this unique Grammar object then could be shared by multiple threads.

If the Grammar object keeps state information multiple threads could access the "state information"
of the object.


I think it would have been better for the GrammarPool to return a copy of the object instead of the
object itself so each thread would have their unique Grammar object.


I would let others comment on this since I've not worked with Grammars for a while.

Jeffrey Rodriguez,
Silicon Valley



From: James Williams - Sun East Coast IR Development <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Are Grammar objects MT-safe ?
Date: Thu, 11 Sep 2003 11:23:15 -0400


I would like to know if it is safe to share a single XMLGrammarPool
instance among several parser instances.

Obviously this won't work if the Grammar objects returned by the
XMLGrammarPool aren't MT-safe, thus my question.

Thanks,
Jim Williams


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


_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today! https://broadband.msn.com



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



Reply via email to