Hi,
I need to do a Circular Buffer Synchronous, how to get information about this?
I work on 3rd edition.
Thanks
Silvia
Hi,
I need to do a Circular Buffer Synchronous, how to get information about this?
I work on 3rd edition.
Thanks
Silvia
I need to implement this:
I need of a thread that write ever on a buffer;
I need of a thread that read on this buffer but, when you read other thread must not write.
If buffer is full, the first thread must write in the start of buffer.
Is possible do this whit CCircle?
I hope to be clear.
Thaks
Silvia
You can but it will be up to you to put a layer over the top to ensure the buffer is in a consistant state across threads (ie Thread Safe)
You don't want a circular buffer, you want a producer/consumer queue
See RMsgQueue which is thread safe
Personally I recommend not using threads.
Hi,
I can imagine CCirBuf + some sync between thread(mutex, rendesvous AO) - the global RMsgQueue seems to be interesting solution - that's the first time I heard about this class (it's good to go throught the forumI didn't get is it LIFO or FIFO?
BR
STeN
Its FIFO, though its better to think of it more in terms of two sides where one produces results and the other side consumes ("eats") the results.
This allows really efficient operation as the two sides can use AO's (via RMsgQueueBase) to coordinate queues.
The queues can also be shared across processes as well as threads, though there is a 64 limit on a queue entry.
Many thanks for Idea
Now study RMsgQueue api, but there is a example of use in sdk?
can I use two object active with RMsgQueue?
Another question: operation of read on this RMsgQueue is locked?
Thans
Silvia