nothingmuch has asked for the wisdom of the Perl Monks concerning the following question:
Personally I liked the old Thread way of doing it better. I prefer having everything shared by default, because i find the process of explicitly sharing tedious and more error prone than making sure I don't get into race conditions. Some would argue that it's better, because unshared data will be barked about, but deadlocks aren't really detectible. So what?
What about a third way of doing it? No variables are shared by default, but data is: you can put a reference in a shared variable, and dereference any length of nested structures from it, in another thread.
And so on, and so forth.
So why isn't there another way? Is there going to be another way? Are ithreads going to become lax enough in the future to allow there to be another way without there really being another way?
Here are some other ways I know, but they aren't really satisfactory:
So, given only these alternatives, and only one (real) way to do it, what is a boy to do?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: TIMTOWTDI vs. ithreads
by diotalevi (Canon) on Sep 14, 2004 at 15:19 UTC | |
by nothingmuch (Priest) on Sep 14, 2004 at 17:32 UTC | |
by diotalevi (Canon) on Sep 14, 2004 at 22:37 UTC | |
|
Re: TIMTOWTDI vs. ithreads
by BrowserUk (Patriarch) on Sep 14, 2004 at 16:59 UTC | |
|
Re: TIMTOWTDI vs. ithreads
by ambrus (Abbot) on Sep 14, 2004 at 16:38 UTC | |
by nothingmuch (Priest) on Sep 14, 2004 at 17:43 UTC | |
by ambrus (Abbot) on Sep 14, 2004 at 17:59 UTC |