(j3.2006) Public Comment J32034

Jim Giles JamesGiles-2
Tue Jul 15 20:30:29 EDT 2008


Aleksandar Donev wrote:
> On Tuesday 15 July 2008 16:53, Jim Giles wrote:
>> And I don't see how the current CRITICAL
>> construct guarantees that the declarations of a procedure are
>> inside the critical section.
> Can you explain what you are asking for here---what procedure are we
> talking about. An example would be great.

Since I recommended that CRITICAL should be a property (like 
RECURSIVE or PURE) that applies to procedure declarations,
pretty much any procedure that implements an operation on shared
data would provide an example.  The declaration of what many 
languages call a "monitor procedure" is a procedure that's also
a critical section:

   Critical subroutine set_flag(args)
    ...
   End subroutine set_flag

Which, let's suppose sets a shared flag variable based on the
arguments.  What's difficult about that?

J. Giles



More information about the J3 mailing list