Here's the script:
- ThreadA is going to read from some socket and write data to "MyFile.txt"
- ThreadB is going to read “MyFile,” and when it reaches the end, it will cycle until new data appears in MyFile (because I don’t want to re-open “MyFile.txt” and lose time so I get to where I was. .).
Can this be done?
If not, is there any other way to do such a thing?
java multithreading file-io
mohamida
source share