develooper Front page | perl.perl5.porters | Postings from June 2002

Threads doc patch

Thread Next
From:
Iain Truskett
Date:
June 30, 2002 22:01
Subject:
Threads doc patch
Message ID:
20020701045814.GB1805@eh.org
Good ol' affect/effect.

*** perlthrtut.pod.orig	Mon Jul  1 14:53:22 2002
--- perlthrtut.pod	Mon Jul  1 14:53:34 2002
***************
*** 465,472 ****
      ... create some threads ...

      $hash{a} = 1;	# all threads see exists($hash{a}) and $hash{a} == 1
!     $hash{a} = $var	# okay - copy-by-value: same affect as previous
!     $hash{a} = $svar	# okay - copy-by-value: same affect as previous
      $hash{a} = \$svar	# okay - a reference to a shared variable
      $hash{a} = \$var	# This will die
      delete $hash{a}	# okay - all threads will see !exists($hash{a})
--- 465,472 ----
      ... create some threads ...

      $hash{a} = 1;	# all threads see exists($hash{a}) and $hash{a} == 1
!     $hash{a} = $var	# okay - copy-by-value: same effect as previous
!     $hash{a} = $svar	# okay - copy-by-value: same effect as previous
      $hash{a} = \$svar	# okay - a reference to a shared variable
      $hash{a} = \$var	# This will die
      delete $hash{a}	# okay - all threads will see !exists($hash{a})

---

-- 
Iain 'Spoon' Truskett.                         <http://eh.org/~koschei/>
Famous last RPG words, number 242 -
     "I explain to the ogre that it was an honest mistake."

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About