Re: Most Efficient FIFO Algorithm?
Re: Most Efficient FIFO Algorithm?
- Subject: Re: Most Efficient FIFO Algorithm?
- From: Kris Amico <email@hidden>
- Date: Sun, 23 Jun 2002 21:43:12 -0700
I may be wrong about this, but your handling of the data is going to go a
lot faster than sending or receiving it. IMO, more important is making sure
your code is thread safe and that you mutex any shared data structures. How
you actually implement the data pump is up to you, and there are many
equally good ways to do it.
If you are fortunate enough to have a baseline of 10.1 or better, you could
use CFStream or CFSocket and avoid the threading problem altogether. I can
attest to the fact that they work. Again, your baseline may be quite a bit
lower than that, but it was just a thought ;)
On 6/23/02 5:46 AM, "Chilton Webb" <email@hidden> wrote:
>
I'm setting up a system that blocks on a socket waiting for data. As it
>
receives data, I want to immediately dump it into an arbitrary chunk of
>
memory and come back to look for more data. This is being done in a
>
pthread. On the 'other side', my app reads this data and processes it.
>
>
I'm looking for a mechanism that will allow me to hand off that data as
>
quickly as possible on the blocking side, though. Should I use an array
>
for that, or would it be faster/better to just manage one giant chunk of
>
data and create my own delimiter for marking the end of the data? Or
>
something else?
>
>
Any suggestions welcome, even ones from people who name their computers
>
with pronouns.
>
>
-Chilton
>
_______________________________________________
>
macnetworkprog mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
>
Do not post admin requests to the list. They will be ignored.
--
Kris Amico <email@hidden>
Senior Software Engineer
Macintosh Client Software Development
EarthLink, Inc.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.