Re: FIFOs.
Re: FIFOs.
- Subject: Re: FIFOs.
- From: Ondra Cada <email@hidden>
- Date: Mon, 20 Aug 2001 16:00:39 +0200
John,
>
>>>>> John C. Randolph (JCR) wrote at Mon, 20 Aug 2001 06:45:10 -0700:
JCR> I want a FIFO implemented as a proper thread-safe ring buffer that will
JCR> grow as necessary to prevent overflow, and avoid needless shuffling of
JCR> memory as your example will do. I want this FIFO to be writeable by one
JCR> thread while being read by another.
The "memory shuffling" is a roaring nonsense. There just might be one
application from 10000 which *MIGHT* have such demands that
NSMutableArray-based FIFO would be unuseable there, but even that I doubt.
Not speaking of the fact that NSMutableArray *CAN BE* (and, by some other's
message, actually _IS_) implemented as a ring buffer.
As for thread-safeness, well, add two more lines with locking. Still not
worth an API, by far.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
- Follow-Ups:
- Re: FIFOs.
- From: "John C. Randolph" <email@hidden>
References: | |
| >FIFOs. (From: "John C. Randolph" <email@hidden>) |