Great. That is really good to hear. It is going to be a challenge to do the same in C++ would love to hellp.
Regards,
JeffFrom: Neil Graham <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Are Grammar objects MT-safe ? Date: Thu, 11 Sep 2003 18:20:59 -0400
Hi James, Jeff and all,
Yes the GrammarPool does return the Grammar object itself; but Xerces-J grammars have been carefully architected so that they don't need to keep state during validation. (I have a todo to make Xerces-C grammars behave the same way). Clearly, since state is not a necessity in a grammar object, there's no reason they shouldn't be designed such that state is not necessary, thus forestalling the need to clone them that as Jeff points out would exist otherwise.
Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED]
"Jeffrey
Rodriguez" To: [EMAIL PROTECTED]
<[EMAIL PROTECTED] cc:
ail.com> Subject: Re: Are Grammar objects MT-safe ?
09/11/2003 02:20 PM Please respond to xerces-j-user
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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Use custom emotions -- try MSN Messenger 6.0! http://www.msnmessenger-download.com/tracking/reach_emoticon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
