Two Laptop Bag
The moose likes Threads and Synchronization and the fly likes Converting a blocking call to non blocking Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Converting a blocking call to non blocking" Watch "Converting a blocking call to non blocking" New topic
Author

Converting a blocking call to non blocking

Thomas Smets
Ranch Hand

Joined: Dec 11, 2001
Posts: 111
Ok,
The problem is rather simple, I want to convert a blocking call into a non-blocking call.
The solution I came up with is not working for an obvious reason : To "quit" the thread it has to be over & the other thread is stil running...
Could someone propose a better idea (or a working one )

Thomas SMETS,
SCJP, Brussels
--

[ April 24, 2002: Message edited by: Thomas SMETS ]

Thomas Smets
Just another developper
Thomas Smets
Ranch Hand

Joined: Dec 11, 2001
Posts: 111
For the one interested here is the solution :

Firstly the blocking call :

Secondly a quick wrapper class :

Fianlly the call :

Thomas SMETS,
SCJP - Brussels
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting a blocking call to non blocking
 
Similar Threads
Unit tests & Singelton
Disabling the 'X' button of JDialog
thread synch and inner classes
How to edit JTable in JEditorPane?
Null pointer exception probably due to synchronisation issues; problem in starting activity