Re: Notification when network volume disappears
Re: Notification when network volume disappears
- Subject: Re: Notification when network volume disappears
- From: Ken Thomases <email@hidden>
- Date: Mon, 14 Jun 2010 13:48:40 -0500
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 (email@hidden)
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:
This email sent to email@hidden