On Jun 14, 2010, at 1:37 PM, Jens Alfke wrote: > On Jun 14, 2010, at 11:13 AM, Ken Thomases wrote: > >> The way around it is to not do blocking operations. Use non-blocking, >> asynchronous I/O operations, and impose the timeout yourself. > > Last I heard (admittedly, a few years ago) there wasn’t any good way to do > async/nonblocking filesystem operations. The standard system calls block; the > O_NONBLOCK mode for fcntl only works on network socket streams; and the AIO > API has (had?) significant issues.
Well, there's always the Cocoa approach with NSFileHandle's ...InBackground... methods and notifications. May not achieve "true" non-blocking, asynchronous operation in some sense, but works for most purposes. Then, pursuit of a "good way" of doing it is left to the framework authors. :) Cheers, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com