develooper Front page | perl.perl5.porters | Postings from July 2002

Re: Thread::Use - use a module inside a thread only

From:
Elizabeth Mattijsen
Date:
July 30, 2002 06:50
Subject:
Re: Thread::Use - use a module inside a thread only
Message ID:
4.2.0.58.20020730154810.024d2880@mickey.dijkmat.nl
At 03:46 PM 7/30/02 +0200, Arthur Bergman wrote:
>>In case it's not clear - I agree that this is the correct approach.
>>It's just that it's hard to do when part of what you're trying to clone
>>is an opaque data structure supplied by a third party library that wasn't
>>expecting to be cloned.
>Some things cannot be cloned, perhaps it should just close the file for 
>the thread, or something, or share the structure between the threads but 
>protect it with a mutex?

I would just close it.  Especially with stuff such as gzip, you're never 
going to get the mutex right from a data consistency point of view...


Liz




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About