On 27 Apr 2005 08:21:27 -0000, [EMAIL PROTECTED] (Rafael Garcia-Suarez) 
wrote:
> Autrijus Tang wrote in perl.perl6.language :
> >
> > 4. Software Transaction Memory
> >
> > Like GHC Haskell, Fortress introduces the `atomic` operator that takes a
> > block, and ensures that any code running inside the block, in a
> > concurrent setting, must happen transactionally -- i.e. if some
> > precondition is modified by another thread before this block runs
> > completely, then it is rolled back and tried again.  This slides covers
> > some aspects of STM as used in GHC:
> >
> >     http://homepages.inf.ed.ac.uk/wadler/linksetaps/slides/peyton-jones.ppt
> >
> > In Fortress, there is also an `atomic` trait for functions, that
> > declares the entire function as atomic.
> 
> Interesting; and this rolling-back approach avoids the deadlock issues
> raised by the use of semaphores (like in Java's synchronization
> approach).
> 
> But, as the slides point out, you can't do I/O or syscalls from an
> atomic function; and in Haskell you can ensure that with the wise use of
> monads. Perl 6 has no monads, last time I checked...
> 

For an alternative approach to concurrency control, that sets out to be a 
possible future standard; specifically designed to address the shortcomings of 
Java's semaphores; that is in the public domain; has already been ported to 
several platforms in several langauges and is known to be implementable on both 
linux and win32; please see 

        http://gee.cs.oswego.edu/dl/cpjslides/util.pdf

for the potted overview, and 

http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html

for a fairly comrehensive examination.

Perl 6/Parrot probably doesn't need everything there, but it might form the 
basis for them.

njs


Reply via email to