in reply to Perl should start to specify which functions and modules are thread-safe
The difference between Tie::File and a library function is clear. Tie::File explicitly stores information between calls. Once you know that Tie::File stores data and doesn't use locking, it should be immediately clear that using it without your own locking on the variable is not thread-safe.
If you're using threads it should be the responsibility of the user to handle locking on shared variables as this allows consistency across their application and they can handle the hard bits like dead-lock resolution.
--
integral, resident of freenode's #perl
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Perl should start to specify which function and module are thread-safe
by pg (Canon) on Feb 02, 2003 at 20:24 UTC | |
by integral (Hermit) on Feb 02, 2003 at 20:32 UTC |