This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gargage collected top-level bindings?


Dean Ferreyra wrote:
I've seen this behavior when initializing and using Kawa modules from Java directly, in threads that were created from Java but not with (future ...). When the thread that has initialized the module ends, some binding-related thread-local objects are garbage collected, the symbols are unbound, and from then on the module's global bindings give the UnboundLocationException exception.

Assuming that we're seeing the same problem, attached is my temporary kludge around it.

Note that I'm not sure this is a bug in Kawa, and I'm fairly sure this temporary kludge is *not* The Right Thing.

Kawa "global" bindings are fluid and thread-local, so if you create a
binding in one thread, and the thread ends goes away, then so does the
binding.  If you have a static module, you might still be able to
reference the ThreadLocation from a different thread, but it will be
unbound.

Using the dynamic environment to access bidnings from a static module
initialized by a diffferent thread is going to be tricky, and it's
not obvious what the "right" behavior is.  If you provide some more
details perhaps we can figure out a solution.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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