Threads Section Index | Page 5

Why does Java prohibit the use of "synchronized" on a constructor?

Is there anything special that needs to be done in order to get the JVM to work efficiently with multiple CPUs on a Windows NT (4.0) machine?

As Solaris has many-to-many threading model/two level threading model, can you tell me how the user thread is mapped to a LWPs exactly? What is the algorithm that is is being followed? Is there any limit (that these many no of threads can only be mapped to one LWP & vice versa)?

How does SunOS 5.6(solaris) handle Java threads on multiple CPUs?

In my main thread I create and start a new Thread(B). From within the run method of Thread B I invoke a public method of my Main class. This method is currently getting executed in Thread B instead I want that method to get executed in Thread Main. Is this possible?

How do I implement a timeout using Java threads? Specifically, I want to connect to one of two servers. If the first one fails after a certain amount of time, I want to try the second one. How do I interrupt the first connection attempt?

How can I create a pool of threads for use in my program?

Does Java keep a count of the number of notifys for a given object? That is, if notify() is called three times on on object A, then will three waits at a later time proceed immediately? Also, if there are three waits on A then at a later point three notifies on A will resume all of three of them?

I have a static method where I pass some parameters and it does db manipulations, returning some resultset. Do I need to synchronize this method to make it thread safe? It does not use any other variables. It only uses local variables passed as method parameters.

How can I find out how many threads are running in the JVM?

How does Linux handle Java thread priorities?

If an exception is thrown inside a synchronized block will the lock on the object that was synchronized be automatically released?

How can I determine if a wait(timeout) timed out

What's wrong with Java threads?

How can I determine if a wait(timeout) timed out or was notify()'ed? I'm thinking of the case where multiple threads are waiting and notifyAll() is NOT used.

About | Sitemap | Contact