<div dir="ltr">Michael Wilber kindly sent me the link:<br><br><div> <a href="http://lists.racket-lang.org/users/archive/2012-April/051485.html">http://lists.racket-lang.org/users/archive/2012-April/051485.html</a><br><br>
and I think that this is not really a good argument for changing the default behavior. A keyword argument that says "create a new eventspace" seems okay, but the docs should explain that this is multi-threading, and if you were to invoke methods of the plot frame without first going to the new eventspace (via queue-callback or something like that), then you'll probably get bad behavior.</div>
<div><br>Robby<br><br>On Mon, Mar 11, 2013 at 1:55 PM, Eli Barzilay <<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>> wrote:<br>><br>> A few minutes ago, Robby Findler wrote:<br>> > There is a tension here, but I actually think Racket's default<br>
> > strategy is the best one (Matthew and I have discussed this a fair<br>> > amount way back when we were first getting GUI stuff going in<br>> > Racket; Java's strategy is different and leads to race-conditions<br>
> > easily, for example.).<br>><br>> In this case, things are kind of obvious if you know about eventspaces<br>> and about the per-plot eventspace feature -- but since this is a quirk<br>> that only plot is doing, most people don't expect it and get<br>
> surprised.<br>><br>><br>> > So if plot's function were just something like:<br>> ><br>> > (define (plot-frmae the-args)<br>> > (define f (new frame% ...))<br>> > ..put stuff in frame..<br>
> > (send f show #t))<br>> ><br>> > Then just hitting run in DrRacket would show you the multiple plots in<br>> > separate frames fine. At the command-line if you script was<br>> ><br>> > #lang racket<br>
> > (require plot)<br>> > (plot-frame ...)<br>> > (plot-frame ...)<br>> > (plot-frame ...)<br>> ><br>> > then that would also work fine (not exiting until you closed all the<br>> > windows).<br>
><br>> +17 if it can work like this. Otherwise, if there's a reason it<br>> can't, then I think that the new-namespace could be available as a<br>> keyword or parameter thing. But the default should be the<br>
> no-surprises version.<br>><br>><br>> > I can't recall anymore the use-case that let Neil to what he's done<br>> > here, so we probably should revisit that.<br>><br>> --<br>> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
> <a href="http://barzilay.org/">http://barzilay.org/</a> Maze is Life!</div></div>