File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
 
 
subject: Converting a blocking call to non blocking
 
Threads others viewed
Null pointer exception probably due to synchronisation issues; problem in starting activity
Unit tests & Singelton
Disabling the 'X' button of JDialog
thread synch and inner classes
How to edit JTable in JEditorPane?
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture