Sujet : Re: Are We Back to the "Wars" Now ?
De : 186283 (at) *nospam* ud0s4.net (186282@ud0s4.net)
Groupes : comp.os.linux.miscDate : 18. Dec 2024, 05:25:25
Autres entêtes
Organisation : wokiesux
Message-ID : <KSGdnbSzt70r0__6nZ2dnZfqn_SdnZ2d@earthlink.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
On 12/17/24 8:23 PM, Lawrence D'Oliveiro wrote:
On Tue, 17 Dec 2024 13:34:30 +0000, Geoff Clare wrote:
With a pipe or FIFO, you just use simple read and write operations and
the system handles all the messy stuff for you. If the pipe reaches
capacity, write blocks until there is room to write some more; if the
pipe becomes empty, read blocks until there is more data available; when
read returns EOF that's the end of the data.
Yup. Furthermore:
* When the last writer closes its end, any remaining read attempts get
EOF.
* When the last reader closes its end, any remaining write attempts get
“broken pipe”.
But you're still limited to the amount of RAM the
system can access.
These days that's probably a LOT - but might NOT be,
esp for 'embedded' type boards like the older PIs,
BBBs and such. Never assume the user has essentially
infinite RAM.
For such platforms you may need to sacrifice speed
and some convenience and instead put such data on a
mass-storage device. Not THAT hard to do - but
remember to use locks.
Know your target audience - yet TRY to accommodate all.
I'll still rec making interprocess comms relatively
terse and handle 'big data' in some other manner
(as extensively covered in this thread). An 8k raw
frame grab is about 146mb - and let's not even speak
of 8k video segments.