[racket] instantiating multiple sandboxes with gui's

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Mar 23 20:35:18 EDT 2014

It is safe, however, to share the racket/gui/base that you get with the one
in the sandbox.

Robby


On Sun, Mar 23, 2014 at 7:25 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> Yes, this is a limitation of `racket/gui/base`. On initialization, the
> library must register in various non-composable ways with an underlying
> GUI toolkit (callbacks, Objective-C classes, Win32 classes, etc.), and
> so `racket/gui/base` cannot be instantiated multiple times.
>
> At Sun, 23 Mar 2014 20:12:43 -0400, Spencer Florence wrote:
> > I'm attempting to launch multiple evaluators which require `racket/gui`,
> > however I get the error:
> >
> > cannot instantiate `racket/gui/base` a second time in the same process
> >
> > Is `racket/gui/base` maintaining some kind of state thats escaping the
> > sandbox?
> >
> >
> >
> >
> >
> > Example of the problem:
> >
> > #lang racket/base
> > (require racket/sandbox)
> >
> > (call-with-trusted-sandbox-configuration
> >  (lambda ()
> >    (define (make)
> >      (make-evaluator 'racket/base
> >                      #:requires '(racket/gui/base)))
> >
> >    (make)
> >    (make)))
> > ____________________
> >   Racket Users list:
> >   http://lists.racket-lang.org/users
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140323/571ed8a4/attachment.html>

Posted on the users mailing list.