;;; -*- mode: scheme; scheme48-package: (config) -*- ;;;; Rendezvous Concurrency Abstraction ;;;; Scheme48 Interface Definitions ;;; This code is written by Taylor Campbell and placed in the Public ;;; Domain. All warranties are disclaimed. (define-interface rendezvous-interface (export rendezvous? ; Rendezvous Combinators quiescent-rendezvous values-rendezvous thunk-rendezvous after-time-rendezvous at-real-time-rendezvous choosing-rendezvous delayed-rendezvous delayed-rendezvous-with-nack map-rendezvous synchronize ; Synchronization synchronize/timeout synchronize-chosen-rendezvous synchronize-chosen-rendezvous/timeout poll ;++ Oddball. Useful? (rendezvous-case :syntax) ; Syntactic Sugar )) (define-interface rendezvous-channels-interface (export make-channel channel? channel-send channel-send-rendezvous channel-receive channel-receive-rendezvous )) (define-interface rendezvous-mailboxes-interface (export make-mailbox mailbox? mailbox-send mailbox-receive mailbox-receive-rendezvous )) (define-interface rendezvous-placeholders-interface (export make-placeholder placeholder? placeholder-value placeholder-value-rendezvous set-placeholder! )) (define-interface rendezvous-semaphores-interface (export make-semaphore semaphore? semaphore-value semaphore-acquire semaphore-acquire-rendezvous semaphore-release )) ;;;; Scheme Compatibility Interfaces (define-interface suspensions-interface (export enter-critical-region exit-critical-region suspend suspension? suspension-revived? maybe-revive revive-multiple )) ;;;; Custom Rendezvous Construction Interface ;;; This is here because compound interfaces cannot have forward ;;; references. (define-interface rendezvous-builder-interface (compound-interface (export polling-rendezvous) suspensions-interface ))