A question about synchronized threads

D

Deeyana

He asked about Java.

He asked in comp.lang.java.programmer; clearly he's developing on the JVM
using Java; but is he *solely* using Java? Java can be extended with
other JVM languages for added flexibility.
Please don't attempt to start another stupid
language war, especially in such an unhelpful way.

What does your classic erroneous presupposition have to do with Java, Lew?
 
D

Deeyana


It is well known that shorter critical sections and finer lock
granularity can increase concurrency, Lew.
Also, if two methods are "totally unrelated to each other" then you
don't need any synchronization at all.

Classic unsubstantiated and erroneous claim. They may still need
synchronization to prevent the simultaneous use of a) the SAME one by two
different threads on the same object or b) one of them and some third
method on the same object. But you may want an explicit lock object
instead of the default effects of declaring the methods synchronized.
The single best, most effective way to optimize concurrent code is not
to share data. The second-best way is to make shared-data immutable
(read-only).

Clojure can help a lot with the latter.
 
L

Lew

He asked in comp.lang.java.programmer; clearly he's developing on the JVM
using Java; but is he *solely* using Java? Java can be extended with
other JVM languages for added flexibility.
OK
What does your classic erroneous presupposition have to do with Java, Lew?

I'm sorry?
 
L

Lew

Your classic erroneous presupposition that I'm trying to start a language
war. What does it have to do with Java?

You have made a classic erroneous presupposition that I think that you're
trying to start a language war. I asked you not to do so; I didn't suggest
that you already had done so. Cast out the beam in thine own eye, mo'fu'.
 
L

Lew

It is well known that shorter critical sections and finer lock
granularity can increase concurrency, Lew.


Classic unsubstantiated and erroneous claim. They may still need
synchronization to prevent the simultaneous use of a) the SAME one by two
different threads on the same object or b) one of them and some third
method on the same object. But you may want an explicit lock object
instead of the default effects of declaring the methods synchronized.


Clojure can help a lot with the latter.

Plonk, schmuck.
 
D

Deeyana

You have made a classic erroneous presupposition that I think that
you're trying to start a language war.

Classic unsubstantiated and erroneous claim. You strongly implied that
you do think that, Lew.
I asked you not to do so; I didn't suggest that you already had done
so.

What does your classic unsubstantiated and erroneous claim have to do
with Java, Lew?
Cast out the beam in thine own eye, mo'fu'.

Who is "mo'fu'", Lew? There is nobody in this newsgroup using that alias.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top