> Yes, Ptolemy's code accomodates both cooperative and preemptive thread > models by design. We run the test suite under both Solaris and > Windows, which have different native threading models. Ptolemy > domains are usually deterministic even when run on different > platforms. > > The fact that scheduling is platform dependent under Java is (IMHO) > one of Java's failings. So much for write once, run everywhere. >
I was under the impression that one of the reasons for moving to Java for Ptolemy II was to take advantage of the thread package in Java and to allow for platform-independence. > I'm not sure I understand the question? What I was referring to was, are there any specific coding styles that allows the consideration of both thread models, or avoiding any special thread calls, synchronizations etc. I believe the only place to figure this out would be in the list of classes you mentioned below? > ptolemy.actor.Manager uses > ptolemy.kernel.util.PtolemyThread > > ptolemy.actor.process.ProcessThread uses > ptolemy.kernel.util.PtolemyThread > > ptolemy.actor.process.ProcessDirector uses > ptolemy.actor.process.ProcessThread > > ptolemy.actor.process.CompositeProcessDirector extends > ptolemy.actor.process.ProcessThread > > CSPDirector, DDEDirector and PNDirector all extend > ptolemy.actor.process.CompositeProcessDirector.java > > You could check out those classes to see how its done. > Thanks Christopher, Hiren ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]