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: thread local variables


> For instance, when you spawn a new thread, which of the original
> threads' bindings should be shared with the new thread?

They are all shared, until the new thread does another fluid-let.

> One can imagine for instance that the current output port could be shared
> between the two threads.  It's not hard to imagine other uses:
> let's say you have a cl-style parameter *print-circle*, one might
> want to have this shared across threads, and have changes to it
> automatically protected with a mutex.

But it is harder to imagine a use that is not handled by fluid-let.

> Having an abstraction like this is very powerful, and I expect that it
> would allow other important features to be implemented easily and
> cleanly.

Please show me a useful example that I can't do with fluid-let.

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner