Re: RFC 178 (v1) Lightweight Threads

2000-09-05 Thread Chaim Frenkel
> "SWM" == Steven W McDougall <[EMAIL PROTECTED]> writes: >> my $a; >> >> Perl simply ignores locking. Thread gets the value of the winner >> in a race condition. Perl does _not_ crash and burn. Internal >> structures, mallocs, and accesses are properly mutexed. SWM> I don't understand this

Re: RFC 178 (v1) Lightweight Threads

2000-09-04 Thread Steven W McDougall
I think we are talking about the same issues, but we can't seem to get in sync on the terminology. I'm going to try to get off the merry-go-round by recapitualting the two approaches. RFC178 - globals are shared unless localized - file-scoped lexicals are shared by all code in the file - block-s

Re: RFC 178 (v1) Lightweight Threads

2000-09-04 Thread Chaim Frenkel
> "SWM" == Steven W McDougall <[EMAIL PROTECTED]> writes: >> Single thingee access mediation, should be done automatically by perl. >> The multi-thingee complex mediation should have the user step in, since >> solving it (correctly and efficiently) is a complex problem. SWM> I'm not sure we

Re: RFC 178 (v1) Lightweight Threads

2000-09-04 Thread Steven W McDougall
> Single thingee access mediation, should be done automatically by perl. > The multi-thingee complex mediation should have the user step in, since > solving it (correctly and efficiently) is a complex problem. I'm not sure we have a common understanding of the terms we are using. Can you give som

Re: RFC 178 (v1) Lightweight Threads

2000-09-04 Thread Chaim Frenkel
> "SWM" == Steven W McDougall <[EMAIL PROTECTED]> writes: SWM> All I want the language to guarantee is internal thread-safety. SWM> Everything else is the user's problem. Somehow I would have thought that goes without saying. But I don't agree that all the rest is a user issue, is too short

Re: RFC 178 (v1) Lightweight Threads

2000-09-04 Thread Steven W McDougall
> SWM> Question: Can the interpreter determine when a variable becomes > SWM> shared? > SWM> Answer: No. Then neglecting to put a :shared attribute on a shared > SWM> variable will crash the interpreter. This doesn't seem very Perlish. > Err, no. It won't crash the interpreter. It'll make the sc

Re: RFC 178 (v1) Lightweight Threads

2000-09-04 Thread Chaim Frenkel
> "SWM" == Steven W McDougall <[EMAIL PROTECTED]> writes: >> Aha, I get it. -internals has been assuming that one _must_ specify >> the sharing. You want it to be infered. >> I think that's asking for too much DWIMery. SWM> Question: Can the interpreter determine when a variable becomes SWM

Re: RFC 178 (v1) Lightweight Threads

2000-09-03 Thread Steven W McDougall
> There is a fundemental issue on how values are passed between > threads. Does the value leave one thread and enter the other or are > they shared. > The idea tossed around -internals was that a value that crosses a thread > boundary would have a wrapper/proxy attached to handle the mediation.

Re: RFC 178 (v1) Lightweight Threads

2000-08-31 Thread Ken Fox
[cc'd to internals to check a possible performance problem.] Steven W McDougall wrote: > > The more interesting case is this: > > > > #!/my/path/to/perl > > sub foo_generator { my $a = shift; sub { print $a++ } } > > my $foo = foo_generator(1); > > $foo->(); > > Thread->new($f