unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: Concurrent MVars for Guile
Date: Wed, 04 Sep 2013 22:10:58 -0400	[thread overview]
Message-ID: <5227E832.9050408@worcester.edu> (raw)
In-Reply-To: <87fvtn1wv8.fsf@tines.lan>

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





  parent reply	other threads:[~2013-09-05  2:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02  7:55 Concurrent MVars for Guile Mark H Weaver
2013-09-03 11:55 ` Mark H Weaver
     [not found]   ` <CAGua6m3o_NexANbGuDYd5_rbPQqsbXkK504ONaFE7PGdQd98og@mail.gmail.com>
2013-09-04  6:27     ` Fwd: " Stefan Israelsson Tampe
2013-09-05  2:10 ` David Thompson [this message]
2013-09-05  2:53   ` Mark H Weaver
2013-09-14 13:59 ` Ludovic Courtès
2013-09-17 20:18   ` Andy Wingo
2014-01-16  0:47     ` Mark H Weaver
2014-01-16 13:01       ` Ludovic Courtès
2014-01-17  6:33 ` Mateusz Kowalczyk
2014-01-17 19:31   ` Mark H Weaver
2014-01-18  0:46     ` Mark H Weaver
2014-01-18  1:05     ` Mateusz Kowalczyk
2014-01-21  5:38       ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5227E832.9050408@worcester.edu \
    --to=dthompson2@worcester.edu \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).