This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++ -> guile threading


Peter Amstutz <tetron@student.umass.edu> writes:

> On Mon, 10 May 1999, Greg Harvey wrote:
> 
> > Peter Amstutz <tetron@student.umass.edu> writes:
> > 
> > > I was just playing with modules and I'm really confused as to how they
> > > work, and I've been pouring over the ice-9 scheme source for the module
> > > system for a while.  Are there any documents or example code showing how
> > > to use modules to restrict certain pieces of code while still allowing
> > > others to work?  I looks like what I'll be doing is having a bit of master
> > > scheme code taking code snippits and then creating scheme threads to
> > > execute said snippts... however the controlling thread-creating thread has
> > > to have some access to stuff that the spawned off new threads
> > > don't...
> > 
> > What you want to do is modify the snippets, so that they run like:
> > 
> > (begin
> >         (define-module (restricted-module))
> >         code...)
> > 
> > (I have no idea about threads stuff ;)

I'd like to stress that once again :). I was thinking that the current
module would (and probably should) be local to the thread, but this is
not the case. Trying to figure out how to do it does make for a nice
little mind bending problem ;), but I think the only way you could do
this would be to make the various module variables into fluids, or
something similar.

-- 
Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]