[racket-dev] More places questions

From: John Clements (clements at brinckerhoff.org)
Date: Fri Sep 30 17:14:50 EDT 2011

On Sep 30, 2011, at 6:31 AM, Matthew Flatt wrote:

> At Fri, 30 Sep 2011 09:21:42 -0400, Eli Barzilay wrote:
>> A few minutes ago, Kevin Tew wrote:
>>> place-channel-put is not blocking.
>> So "channel" in the name is not a good choice...
> We use "channel" for asynchronous channels, too, such as
> `racket/asynch-channel'. Since all place channels are asynchronous, I
> think it would be redundant to include `async' in the name.

I see that it's not blocking... there's something else fishy going on, though. This program:

#lang racket

(define (main)
  (define p 
    (place ch
           (thread (lambda () (place-channel-put ch 'letter-to-myself)))
           (define result (place-channel-get ch))
           (printf "got a result: ~s\n" result)))

...doesn't print anything out.  This suggests that place-channels are unlike regular ones, in that they refer to a different channel when used with channel-put than they do when used with channel-get.  I'm not sure how I would clarify the docs here. 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110930/5966eeb7/attachment.p7s>

Posted on the dev mailing list.