I'm convinced that some problems are considered hard mainly because they're really good at exposing unquestioned assumptions at different levels of a system.
Barrier → Please Donââ¬â¢t Rely on Memory Barriers for Synchronization! → C++ and the Perils of Double-Checked Locking
Barrier → The Problem with Threads → The Problem with Threads
In concurrency, one of those levels having its assumptions challenged is the programmer, but that's not the only reason it's hard.
I hope people take time to read the articles before just assuming they're another reason to dismiss/avoid Perl's threads. ithreads has its issues, but applying some of the techniques in Lee's article may mitigate the nondeterminism issues somewhat (as I've attempted w/ Thread::Apartment).
Re:Thanks for the links...
Alias on 2007-07-25T05:23:20
This issue with assumptions if why I removed as many as I could and came up with Process.pm:)
I'm having fairly good success with it for things other than actual parallel processing (running different parts of a program across two different versions of Perl).
I'm hoping it's going to be a slam dunk when the time comes to do some serious work with it.