FoP Exercises 7
16-May-2002
School of Computer and Communication Sciences
Programming Methods Laboratory (LAMP)
 
 
Home
Staff
Research
Publications
Events
Teaching
  FoP
    Overview
    Schedule
    Slides
    Tutorial
    Contact
    Links
Jobs
   
 
  
     

The task of this exercise is to implement Queues in Funnel using join synchronization. In a queue, data is stored and retrieved according to the FIFO (first in first out) principle.

A queue is supposed to support at least two operations: put and get. With put, a new element x is appended to the end of a queue. get returns the first available element.

Implement a constructor newQueue that returns an empty queue, represented by a record consisting of at least the two functions put and get.

def newQueue = {
    ...
}
Your implementation should be synchronized, so that it can be used in concurrent programs.
     
   [an error occurred while processing this directive]  
Last modified: Monday, 01-Mar-2004 14:31:04 CET