Chapter 9

cml.ss: Concurrent ML Compatibility

This library defines a number of procedures that wrap MzScheme concurrency procedures. The wrapper procedures have names and interfaces that more closely match those of Concurrent ML.

(spawn thunk)      PROCEDURE

Equivalent to (thread/suspend-to-kill thunk) (see section 7.1 in PLT MzScheme: Language Manual).

(sync waitable)      PROCEDURE

Equivalent to (object-wait-multiple #f thunk) (see section 7.6 in PLT MzScheme: Language Manual).

(channel)      

procedure

Equivalent to (make-channel) (see section 7.5 in PLT MzScheme: Language Manual).

(channel-recv-evt channel)      PROCEDURE

Equivalent to channel.

(channel-send-evt channel v)      PROCEDURE

Equivalent to (make-channel-put-waitable channel v) (see section 7.5 in PLT MzScheme: Language Manual).

(choice-evt waitable ···)      PROCEDURE

Equivalent to (waitables->waitable-set waitable ···) (see section 7.6 in PLT MzScheme: Language Manual).

(wrap-evt waitable proc)      PROCEDURE

Equivalent to (make-wrapped-waitable waitable proc) (see section 7.6 in PLT MzScheme: Language Manual).

(guard-evt thunk)      PROCEDURE

Equivalent to (make-guard-waitable thunk) (see section 7.6 in PLT MzScheme: Language Manual).

(nack-guard-evt proc)      PROCEDURE

Equivalent to (make-nack-guard-waitable proc) (see section 7.6 in PLT MzScheme: Language Manual).

(thread-done-evt thread)      PROCEDURE

Equivalent to (thread-dead-waitable thread) (see section 7.2 in PLT MzScheme: Language Manual).

(current-time)      PROCEDURE

Equivalent to (current-seconds) (see section 15.1 in PLT MzScheme: Language Manual).

(time-evt k)      PROCEDURE

Returns a waitable that is ready whenever (current-time) returns a value greater than or equal to k.