Thread Storable->retrieve parallel aus einem weiteren Programm? (12 answers)
Opened by toby at 2009-09-30 15:28

pq
 2009-09-30 15:38
#126344 #126344
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
aus der doku (ich habe einfach nur nach "lock" gesucht):
Code: (dl )
1
2
3
4
5
6
7
8
9
10
        # Advisory locking
use Storable qw(lock_store lock_nstore lock_retrieve)
lock_store \%table, 'file';
lock_nstore \%table, 'file';
$hashref = lock_retrieve('file');
[...]
The "lock_store" and "lock_nstore" routine are equivalent to
"store" and "nstore", except that they get an exclusive lock on
the file before writing. Likewise, "lock_retrieve" does the same
as "retrieve", but also gets a shared lock on the file before reading.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Storable->retrieve parallel aus einem weiteren Programm?