Re: should ExtendedTypes be thread safe?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: should ExtendedTypes be thread safe?

Andrus Adamchik
> Hello.
> I am creating a ExtendedType that uses a parser-object. I want to
> reuse the parser object as much as possible. Will a single instance
> of my ExtendedType be used by more than one thread at a time? If so -
> I guess I will use a ThreadLocal to hold the parser instance.
> Regards,
>   - Tore.

ThreadLocal makes more sense. ExtendedType instances are not thread-safe
and can be reused by multiple queries simulteneously.

BTW, thanks for the "mapping geometries" Wiki post -