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: 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/


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