[erlisp-devel] process-linking errors

Dirk Gerrits dirk at dirkgerrits.com
Thu Sep 1 17:33:18 UTC 2005


Eric Lavigne wrote:
>>> When I run it, it continues indefinitely and slows my computer to
>>> a crawl.
>>
>>How can you run it if it doesn't compile?
> 
> 
> When I compile the rest of it and then paste that particular function
> into the REPL... I guess Willem's explanation shows why that worked.

Ah right.  Hmm, so then why the crawling?  Is that because of the busy
waiting style of the messaging system then?  That really needs to be
addressed any way...  I think this should do the trick for AllegroCL,
but I can't try it out just now:

(defun make-event ()
   ...
   #+allegrocl (mp:make-gate nil)
   ...)

(defun event-wait (event mutex)
;note: this function should appear inside with-mutex block
   ...
   #+allegro (progn (mp:process-wait "wait for message"
                                     #'mp:gate-open-p
                                     event)
                    (mp:close-gate event))
   ...)

(defun event-notify (event)
   ...
   #+allegro (mp:open-gate event)
   ...)

- Dirk



More information about the Erlisp-devel mailing list