Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: pthread code I may use
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pthread code I may use



If you've never designed a threaded system before, what makes you certain that AIO's implementation, even if threaded, would be less efficient than yours?

Threading is difficult and in some cases highly unintuitive. I'd expect that system-level code would already have seen a lot of real-world tuning and performance checking that any written-from-scratch code wouldn't have.


Theodore H. Smith wrote:

On 1 Apr 2008, at 23:36, Rick Altherr wrote:

Why not use AIO? Then you don't need to handle the thread creation, etc. You would just specify what file descriptor, offset, and length you want read. Then, when you are ready, you can see if the AIO was completed.

Because I heard AIO is sometimes implemented as threads underneath :)

So I might as well write my own thread code, and cut out the overhead.

Also, I want my code to run on Mac MachO, Win32, and Linux, and Mac Carbon too. Not sure how that will work out with AIO.

And finally... I just like learning and doing new things. So getting threads to work is kinda cool to me.

--
http://elfdata.com/plugin/
"String processing, done right"


_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:


This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >pthread code I may use (From: "Theodore H. Smith" <email@hidden>)
 >Re: pthread code I may use (From: Rick Altherr <email@hidden>)
 >Re: pthread code I may use (From: "Theodore H. Smith" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.