[racket-dev] Racket Guide chapter on concurrency

From: David Vanderson (david.vanderson at gmail.com)
Date: Mon Oct 7 16:08:27 EDT 2013

This is fantastic!  Thank you!  I learned a good deal reading it just 
now.  Comments below:

On 10/06/2013 04:30 PM, David T. Pierson wrote:
> 1) Should it be broken into separate pages?
I'd leave it as a single page for now.  Easier to update.
> 2) It starts out with the basics of threads.  Is this too trivial to cover?
Please keep that part.  It gives the reader confidence.
> 3) There are lots of ways to synchronize Racket threads.  I try to cover them
> broadly, but don't really delve into which ones are best.  Parts seem like
> they are just restating information from the reference.  Should there be more
> prescriptive text?
I think the text you have is good already.  The Guide and Reference are 
going to repeat some information, which is good.  Your page offers a 
quick overview, which is perfect for the Guide.  It would be nice to 
have a prescriptive sentence for each feature giving some guidance on 
when to use which, but I don't have the experience to write those.
> 4) Some of the examples feel clumsy.  Contriving concurrency examples
> that are both simple and meaningful was hard.  I'm not sure I succeeded.
They are better than nothing!

make-arithmetic-thread is missing a "(let loop ()" line.  Later in the 
same example "(match" should be "(match item".

In the channel example, could you have the worker threads return some 
text when they are done?  It makes running the example clearer.  I don't 
understand the note below this example about the lack of 
synchronization.  I don't see how that can happen, can you explain it to me?

Even after reading the reference on wrap-evt and handle-evt, I don't 
understand when I would use wrap-evt.  It seems like handle-evt is 
better?  For the guide, I suggest cutting the wrap-evt example, and only 
show handle-evt.

Thanks,
Dave


Posted on the dev mailing list.