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