module: threads-internal Synopsis: The implementation of the class Author: Tony Mann Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND define open abstract class () constant slot synchronization-name :: , init-value: #f, init-keyword: name:; end class; define open generic synchronization-name (object :: ) => (name :: ); define open generic wait-for (object :: , #key timeout = #f) => (success?); define open generic release (object :: , #key) => (); define generic millisecs (secs :: ) => (millisecs :: ) ; define method millisecs (secs :: ) => (millisecs :: ) round(secs * 1000); end method; define method millisecs (secs :: ) => (millisecs :: ) secs * 1000; end method; define function check-synchronization-creation (sync :: , res :: ) => () unless (res == $success) error(make(, synchronization: sync)); end unless; end; define function check-synchronization-finalization (sync :: , res :: ) => () unless (res == $success) error(make(, synchronization: sync)); end unless; end;