Results 1 to 2 of 2
Thread: concurrent programming
- 12-02-2010, 08:03 PM #1Member
- Join Date
- Apr 2010
- Rep Power
Questions for the experts out here...
I am very new to java... I treat it as C till now..but now i have to do multithreading for what i want to achieve...
Any suggestions on how to perform multithreading in java...
I got four programs , each of them gets a packet of data and check the first four bytes and compares them to last 4 bytes and if the difference is greater than 2 then they overwrite the file else they write it in to file.I have now synchronization issues since i have four independant programs..i want to merge them together.
Ideally i would like to start 4 threads , each thread receiving packets independantly ,cacultes the difference and the difference value has to be passed to the main function where i would check the values of all threads, would decide if i want to overwrite all the files of each thread or write data into it.
Any idea how to pass data between threads ?
Would really appreciate the help.
- 12-02-2010, 08:33 PM #2
Google is really a miracle of modern technology.
Lesson: Concurrency (The Java™ Tutorials > Essential Classes)
- By flok in forum NetworkingReplies: 1Last Post: 10-19-2009, 04:56 PM
- By bert682 in forum Threads and SynchronizationReplies: 4Last Post: 10-11-2009, 04:47 PM
- By Chinnu in forum Java ServletReplies: 3Last Post: 08-11-2009, 05:41 AM
- By m@tqi in forum Advanced JavaReplies: 1Last Post: 12-01-2007, 01:09 AM
- By JavaForums in forum EclipseReplies: 0Last Post: 05-02-2007, 03:03 PM