Results 1 to 1 of 1
- 04-05-2009, 08:42 PM #1Member
- Join Date
- Apr 2009
- Rep Power
Problem in Thread wakeup of Java NIO Client
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.
Anil Kumar S. R.
- By lunarstyle in forum AWT / SwingReplies: 9Last Post: 12-19-2009, 05:14 PM
- By fithous in forum New To JavaReplies: 1Last Post: 04-02-2009, 10:50 PM
- By b000m in forum New To JavaReplies: 6Last Post: 08-18-2008, 07:44 AM
- By skaterxu in forum Advanced JavaReplies: 0Last Post: 01-28-2008, 08:02 AM