Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Search the Tips

Threading - Page 4

61-64 of 64     Previous     Next
How to Keep Track of Number of Threads or Connections
by DevX Pro
I have a server application listening for client applets to connect. The server spawns a new thread each time a connection to a client is established. I want to keep track, i.e. count the number of clients connected and output it to a textfield in a frame. I am not sure how Java handles shared data among threads so my question is: How does one keep track of the number of threads or connections? I want the number of threads to be displayed in a single frame; I tried something, but a new window is created each time a new thread is spawned.
How to Prevent Simultaneous Access
by DevX Pro
How do you lock a file in Java to prevent simultaneous multiple accesses?
Passing Data Between Two Threads
by DevX Pro
I am new to Java and am currently trying to associate idioms and techniques from other languages/environments with like capabilities in Java. Specifically, I am trying to determine how to perform inter-thread and inter-process communication. How does one pass data, in the form of an Object or Object reference, between two threads?
What is the Thread.interrupt()method's purpose?
by DevX Pro
What is the purpose of the Thread.interrupt() method? I expect that if I call the interrupt() method of a sleeping thread, an InterruptedException will be thrown. Here is a quick code sample showing my thoughts (please forgive the formatting):*/ class Timer extends Thread { public void run() { for(int i = 0; i I expect that when s.foo() is called, I will see output resembling Interrupted! What am I missing?
61-64 of 64     Previous     Next
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date