Re: RFC 178 (v1) Lightweight Threads
[email protected] (Chaim Frenkel) 03 Sep 2000 07:38:27 -0400
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
I was wondering, should there be a split between the name and the contents? So that my $a :shared; my $b; $b = $a = &fn; So that access through $a is mediated. Access through $b is "don't do that". Should perl take on the responsibility of coddling the user? Perhaps a warning if the contents of a :shared variable moves into a non-shared variable. Alternatively, the thread doing the moving, somehow takes ownership of the contents, and makes the contents unavailable to any other thread? Thoughts? <chaim> >>>>> "CF" == Chaim Frenkel <[email protected]> writes: >>>>> "SWM" == Steven W McDougall <[email protected]> writes: >>> Not unless it is so declared my $a :shared. SWM> Sure it is. SWM> Here are some more examples. SWM> Example 1: Passing a reference to a block-scoped lexical into a thread. CF> The mediation would be activated only if the value is passed via a CF> shared variable. In your case the shared variable is the argument CF> being passed through the thread creation call. -- Chaim Frenkel Nonlinear Knowledge, Inc. [email protected] +1-718-236-0183