This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: change in static modules
Per Bothner <per@bothner.com> writes:
I'm considering a change in the implementation of static modules,
and specically in when "module level actions" are performed.
I've implemented and hcecked this in.
The new --module-static-run option gives the old behavior, with
'run' being called from the class initializer.
Chris Dean wrote:
Obviously, it's important that $instance.run() be thread safe.
I believe so. ModuleBody now does:
public void run ()
{
synchronized (this)
{
if (runDone)
return;
runDone = true;
}
run (VoidConsumer.instance);
}
where run(Consumer) is the actual module body.
--
--Per Bothner
per@bothner.com http://per.bothner.com/