[racket-dev] Racket Guide chapter on concurrency

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Oct 8 04:42:56 EDT 2013

FWIW, I agree that handle-evt is more generally useful than wrap-evt
(programming with breaks gets tricky and would require it's own setup).

You can use things like @interaction[] to run and typeset examples; does
that help?

http://docs.racket-lang.org/scribble/eval.html?q=interaction#%28form._%28%28lib._scribble%2Feval..rkt%29._interaction%29%29

Robby


On Mon, Oct 7, 2013 at 10:33 PM, David T. Pierson <dtp at mindstory.com> wrote:

> On Mon, Oct 07, 2013 at 04:08:27PM -0400, David Vanderson wrote:
> > This is fantastic!  Thank you!  I learned a good deal reading it
> > just now.  Comments below:
>
> Great!  Thanks for checking it out and commenting.
>
> > make-arithmetic-thread is missing a "(let loop ()" line.  Later in
> > the same example "(match" should be "(match item".
>
> Ugh, that's sloppy of me.  Thanks for catching these.  I wonder if there
> is an easy way to run individual examples from a scribble doc without
> copying to and from different buffers.  (I'm assuming I messed up a copy
> & paste at some point.)
>
> > 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?
>
> Darn.  I had fixed that lack of synchronization by adding the DONE
> items, but neglected to remove the note.  The note does apply to the
> next example though, so I moved it down.
>
> An update is at:
>
>
> https://github.com/davidtpierson/racket/commit/ba1caddb9964c85740e2beb92477d25519a2ba7d
>
> > 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.
>
> Hmm, the advantage of wrap-evt over handle-evt is that wrap-evt disables
> breaks before calling the handler.  I'll either incorporate that info or
> remove the example, but first I need to learn a bit more about breaks.
>
> David
>
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20131008/e5b2ae42/attachment.html>

Posted on the dev mailing list.