This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Typo in comment.
[perl5.git] / ext / Thread / Thread / Specific.pm
CommitLineData
458fb581
MB
1package Thread::Specific;
2
28b605d8
JH
3our $VERSION = '1.00';
4
d516a115
JH
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
GS
14=head1 DESCRIPTION
15
16C<key_create> returns a unique thread-specific key.
17
d516a115
JH
18=cut
19
2954239b 20sub import : locked : method {
458fb581 21 require fields;
ad78e549 22 fields::->import(@_);
458fb581
MB
23}
24
2954239b
GS
25sub key_create : locked : method {
26 our %FIELDS; # suppress "used only once"
458fb581
MB
27 return ++$FIELDS{__MAX__};
28}
29
301;