Re: synchronized class



John Goche wrote:

I would like to know whether the "synchronized class" construct is valid in JDK 1.5 and whether it has any meaning at all in the context of multithreaded programming or whether the compiler will ignore it altogether. I have read some posts stating that "synchronized class" is not a legal way to begin a Java class definitions. Any comments on this would be sincerely appreciated.

JDK 1.0.2 (not sure about 1.1, certainly not 1.2) allowed "synchronized class". That was a bug. IIRC, it set the equivalent but unassigned bit in class file. It had, and has still, absolutely no effect on runtime behaviour.


Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
.



Relevant Pages

  • Re: synchronized class
    ... > of multithreaded programming or whether the compiler will ignore it ... I have read some posts stating that "synchronized class" ... > is not a legal way to begin a Java class definitions. ...
    (comp.lang.java.programmer)
  • Re: synchronized class
    ... >> valid in JDK 1.5 and whether it has any meaning at all in the context ... >> of multithreaded programming or whether the compiler will ignore it ... It has a huge effect on runtime behavior now: if you can't compile a class, ...
    (comp.lang.java.programmer)
  • Re: Massive Multi Core: The next big thing?
    ... rather than the language and/or compiler i.e.. ... No, because current language and compilers don't allow multithreaded programming in all but the simplest of all cases, and even in those, being truly multithreaded *and* scaling with the number of processors is still an achievement worthy of mention... ... Even the basic bricks, such as Exception mechanisms, are missing: ...
    (borland.public.delphi.non-technical)
  • Re: Does NetBSD understand the __thread variable declaration ?
    ... > multithreaded programming. ... > think more a os runtime then a compiler feature. ... What thread *semantics* are supported in the kernel is an OS ...
    (comp.unix.bsd.netbsd.misc)