Fixing a Perl_my_dirfd() related test failure.
[p5sagit/p5-mst-13.2.git] / ext / Thread / Thread / Specific.pm
CommitLineData
458fb581 1package Thread::Specific;
2
28b605d8 3our $VERSION = '1.00';
4
d516a115 5=head1 NAME
6
7Thread::Specific - thread-specific keys
8
9=head1 SYNOPSIS
10
11 use Thread::Specific;
12 my $k = key_create Thread::Specific;
13
707102d0 14=head1 DESCRIPTION
15
16C<key_create> returns a unique thread-specific key.
17
d516a115 18=cut
19
2954239b 20sub import : locked : method {
458fb581 21 require fields;
ad78e549 22 fields::->import(@_);
458fb581 23}
24
2954239b 25sub key_create : locked : method {
26 our %FIELDS; # suppress "used only once"
458fb581 27 return ++$FIELDS{__MAX__};
28}
29
301;