develooper Front page | perl.perl6.language | Postings from April 2005

Re: Sun Fortress and Perl 6

Thread Previous
Nigel Sandever
April 27, 2005 05:14
Re: Sun Fortress and Perl 6
Message ID:
On 27 Apr 2005 08:21:27 -0000, (Rafael Garcia-Suarez) 
> 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:
> >
> >
> >
> > 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

for the potted overview, and

for a fairly comrehensive examination.

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


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About