[plt-scheme] Implementing engines using threads

From: ifconfig (nslookupifconfig at hotmail.com)
Date: Tue Apr 27 20:20:17 EDT 2004

I would use:

(define-values (i o) (make-pipe))
(start-the-engine)
(let ([val (read o)])
  (if (equal? val eof)
      'failure
      'success))

And in the engine, success would print the return value and close the port,
failure would close the port.

Simple and elegant, in my view. Probably costs a lot of resources though.
 

Yours truly,

ifconfig

BAGOS

http://bagos.sourceforge.net


Posted on the users mailing list.