www.antiaction.com / java / critical
Semaphores for use where tight resource control is needed.
This package is distributed under the Free software Foundation's (FSF) General Public License (GPL).
Semaphores are an extension of the java synchronization framework. In actuallíty the classes are wrapped around some datastructures and synchronized methods.
The main purpose of a semaphore is to restrict access to some critical region in a multithreaded program. Access can be mutually exclusive, resource determined or access determined. This package implementes 3 kinds of semaphores.
Restricts access to one thread at a time wirh support for nesting. Works like basic synchronization. People used to working with lowlevel languages might find this class closer to home.
Allows for resource based multithreaded access to data. Access is allowed as long as there is at least one free resource. Possible use could be in a Provider/Consumer framework.
Enforces simultanious read access but exclusive write access.
Feedback should be sent to firstname.lastname@example.org.