Results 1 to 1 of 1
- 04-05-2009, 07:42 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 2
- Rep Power
- 0
Problem in Thread wakeup of Java NIO Client
Hi All,
I am writing a client using the Java NIO API. Before sending the messages through the channel to the server, I am writing the data to a variable and calling the wakeup method of the Selector, to wake up any thread waiting on the select method. However the problem here is the wakeup method is being called before the thread waits on the select. So, the wakeup call is wasted and the thread is waiting for the wakeup call after some time, which is causing an almost deadlock. Can you please tell me how to ensure that the wakeup call doesn't go waste.
Regards,
Anil Kumar S. R.
Similar Threads
-
a problem about java mail client program
By lunarstyle in forum AWT / SwingReplies: 9Last Post: 12-19-2009, 04:14 PM -
Exception in thread "main" java.lang.NoClassDefFoundError: client
By fithous in forum New To JavaReplies: 1Last Post: 04-02-2009, 09:50 PM -
Exception in thread "main" java.lang.NoClassDefFoundError: client Help
By b000m in forum New To JavaReplies: 6Last Post: 08-18-2008, 06:44 AM -
If JNI thread call the java object in another thread, it will crash.
By skaterxu in forum Advanced JavaReplies: 0Last Post: 01-28-2008, 07:02 AM


LinkBack URL
About LinkBacks

Bookmarks