
November 6th, 2009, 01:49 AM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 1
Time spent in forums: 16 m 21 sec
Reputation Power: 0
|
|
|
Multithreading for your Java application development
As you have already chose the Java for implementing multithreading so platform is no more the issue. Otherwise I would have been suggested you the .net platform to do so. As .net provides a special functionality as whenever any unused or suspended thread found it automatically load another thread from the memory. This could help you in tracking whether you file has been done with reading process or not.
Coming to your issue, being one of the Java Developers I can suggest you to make three threads, Reading, Writing and tracing. Also if u want to do something innovative to your application then use FILE Structure Implementation which is used in Unix Kernel process. You can make one data structure with three fields. Reading, Writing and Status code. This structure will eliminate the requirement of third thread. Whenever reading thread ends - it will make reading status code 1->0, when writing process will end it will also make code 1->0 in the structure and when both the field, say reading and writing field of data structure comes to 0 you can make the final status code o->1, showing that a complete process of reading and writing has been over. I have more detail idea on this, please check my profile and you can talk to me on msger.
Thank you.
|