Thread Safety

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Thread Safety

Grant Ingersoll-2
Hi,

Is AutoDetectParser thread-safe and/or all the other parsers?

-Grant
Reply | Threaded
Open this post in threaded view
|

Re: Thread Safety

Jukka Zitting
Hi,

On Wed, Nov 12, 2008 at 5:23 PM, Grant Ingersoll <[hidden email]> wrote:
> Is AutoDetectParser thread-safe and/or all the other parsers?

Yes. Once initialized, a parser instance should be immutable and thus
fully thread-safe.

BR,

Jukka Zitting
Reply | Threaded
Open this post in threaded view
|

Re: Thread Safety

Grant Ingersoll-2
Is it costly to create a Parser?  I suspect it isn't if you already  
have the config, which I do.

On Nov 13, 2008, at 8:51 AM, Jukka Zitting wrote:

> Hi,
>
> On Wed, Nov 12, 2008 at 5:23 PM, Grant Ingersoll  
> <[hidden email]> wrote:
>> Is AutoDetectParser thread-safe and/or all the other parsers?
>
> Yes. Once initialized, a parser instance should be immutable and thus
> fully thread-safe.
>
> BR,
>
> Jukka Zitting


Reply | Threaded
Open this post in threaded view
|

Re: Thread Safety

Jukka Zitting
Hi,

On Thu, Nov 13, 2008 at 4:22 PM, Grant Ingersoll <[hidden email]> wrote:
> Is it costly to create a Parser?  I suspect it isn't if you already have the
> config, which I do.

Correct, they are just simple instances. Almost all the work is done
in the parse() method.

BR,

Jukka Zitting