Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
473 B

package Thread::Specific;
=head1 NAME
Thread::Specific - thread-specific keys
=head1 SYNOPSIS
use Thread::Specific;
my $k = key_create Thread::Specific;
=head1 DESCRIPTION
C<key_create> returns a unique thread-specific key.
=cut
sub import : locked : method {
require fields;
fields::->import(@_);
}
sub key_create : locked : method {
our %FIELDS; # suppress "used only once"
return ++$FIELDS{__MAX__};
}
1;