Thread reentrant locks are given syntactic and implementational support in Oz. They are implemented as subtype of chunks. E is an expression that evaluates to a lock. The construct blocks until S is executed. If E is not a lock, then a type error is raised.
E is a lock.
Arrays Oz has arrays as chunk subtype. Operations on arrays are defined in module Array . As a simple illustration of the use of locks consider the program in Figure 11.1 . The procedure Zero resets all elements to zero. Using a lock Try the following program.