Hello!
There are a few thread..at most 10 threads.
They have each own buffer array.
They post their own buffer's current index to mainform
and then mainform access (read) the thread's buffer data.
There is not any Synchronization and not any criticalsection.
is there any problem ? or any suggestion?
Thanks in advance.
code like this as summary:
type
TplThread = Class(TThread)
..
..public
....Buffer:array[0..100, 0..BufSize] of char;
..
on thread execute
..ReadFile(Pipe1, Buffer[currentBufferIndex, 0], BufSize, BytesRead, nil);
..
..postmessage(threadid, currentBufferIndex) to main form
..
on MainForm
..memo.Lines.Add(thread1.Buffer[currentindex]);
or
..write thread1.Buffer[currentindex] to a logfile...
-0-