>>>>> "KF" == Ken Fox <[EMAIL PROTECTED]> writes:
KF> The more interesting case is this:
KF> #!/my/path/to/perl
KF> sub foo_generator { my $a = shift; sub { print $a++ } }
KF> my $foo = foo_generator(1);
KF> $foo->();
Thread-> new($foo);
KF> Is $a shared between threads or not? If $a is not shared, we've broken
KF> lexicals.
Not unless it is so declared my $a :shared.
What the value is without the attribute, I won't even think about.
Are we going the fork() route where the current value is cloned, or perhaps
something else entriely.
Would making closures only under direct instructions be something useful?
It would add some typing, but would be a guide to both the reader and
perl (and perhaps, prevent some unanticipated closures from being created.)
<chaim>
--
Chaim Frenkel Nonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183