On 09/02/2013 03:55 AM, Mark H Weaver wrote:
Hello all,

I've attached a preliminary implementation of MVars à la Concurrent
Haskell for Guile.  I made a few small changes to the API to better
match Scheme conventions, and added atomicity guarantees for 'read-mvar'
and 'swap-mvar'.  I also added the interface 'try-read-mvar'.

Note that the fairness of this implementation relies upon the fairness
of Guile's mutexes and condition variables, which I have not checked.

Comments and suggestions welcome.

I was thinking that maybe we should add something like this to core
Guile.  What do you think?

      Mark


I am using this for my game library, guile-2d (the first version that you posted). A user ran into trouble installing guile-2d because of an error with case-lambda in this module. They are using Guile 2.0.7.

Thoughts?

~/Downloads/guile-2d  $ make
  GEN2d/game-loop.go
ice-9/boot-9.scm:106:20:  In  procedure#<procedure 9f50900 at 
ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20:  Syntax  error:
2d/mvars.scm:52:2:  case-lambda:  badcase-lambda  in  form(case-lambda  "Return a 
freshly allocated mvar.  The optional argument, if provided,\nspecifies the initial 
contents of the mvar, otherwise it will be empty."  (()  (make-mvar#f #t 
(make-mutex) (make-condition-variable))) ((x) (make-var x #f (make-mutex) 
(make-condition-variable))))
make:  ***  [2d/game-loop.go]  Error  1



Reply via email to