New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
threads::shared and perlthrtut: Update to give example of object sharing #5578
Comments
From perl58@dev1.ridas.co.ukCreated by scriptyrich@yahoo.co.ukHaving tried to share objects by writing stuff along the lines: my $a : shared = new FOOBAR; It took a posting to comp.lang.perl.misc before I realised the error of my ways: my $a = new FOOBAR; I don't think the threads::shared and perlthrtut docs make this clear enough - SOLUTION: More examples in the docs please, esp. regarding object sharing. Also Perl Info
|
From @schwern
threads::shared and perlthrtut still lacks this additional documentation. |
From @iabynOn Thu, Jul 14, 2005 at 01:33:54AM -0700, Michael G Schwern via RT wrote:
How about this: -- Change 25161 by davem@davem-splatty on 2005/07/17 20:54:15 [perl #9720] document what can be assigned to a shared scalar Affected files ... ... //depot/perl/ext/threads/shared/shared.pm#38 edit Differences ... ==== //depot/perl/ext/threads/shared/shared.pm#38 (text) ==== @@ -53,6 +53,10 @@ my $var : shared; my($scalar, @array, %hash); C<share> will traverse up references exactly I<one> level. A variable can also be marked as shared at compile time by using the +The only values that can be assigned to a shared scalar are other scalar C<lock> places a lock on a variable until the lock goes out of scope. |
@smpeters - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#9720 (status was 'resolved')
Searchable as RT9720$
The text was updated successfully, but these errors were encountered: