F
frustrated
I am trying to share a file stream between two threads,
but havent got a clue as to how to do it.
The first thread will be reading the file, and the second
thread will(/might) be writing to the same file stream. I
was going to pass a ref to the file stream to the second
thread, but the problem comes when I am trying to read
from one section of the stream and write to another. I
dont want one thread changing the position of the stream
pointer, then have the other thread writing in that
position.
The only thing that I could find is the readerwriterlock
class, but there has got to be a slicker solution that
alows me to have two stream pointers.
Any ideas?
but havent got a clue as to how to do it.
The first thread will be reading the file, and the second
thread will(/might) be writing to the same file stream. I
was going to pass a ref to the file stream to the second
thread, but the problem comes when I am trying to read
from one section of the stream and write to another. I
dont want one thread changing the position of the stream
pointer, then have the other thread writing in that
position.
The only thing that I could find is the readerwriterlock
class, but there has got to be a slicker solution that
alows me to have two stream pointers.
Any ideas?