Re: NSFileHandle thread safe ?
Re: NSFileHandle thread safe ?
- Subject: Re: NSFileHandle thread safe ?
- From: Alec Carlson <email@hidden>
- Date: Tue, 13 Sep 2005 20:35:28 -0500
Finlay,
That¹s what I was hoping. However, the replies to this question are running
3:1 in favor of the notification occurring in the threads context. It is
certainly possible that NSFileHandle forces the
NSFileHandleReadCompletionNotification notification on the main run loop
that¹s what I want and it¹s easy enough to do, but... Does anyone know for
certain main run loop (main thread) or NSFileHandle background thread ? I
suppose I could just try it and see but I¹m designing as I go and the answer
to this question impacts how the code has to be written.
Thanks -
Alec
on 9/13/05 6:05 PM, Finlay Dobbie at email@hidden wrote:
> On 13/09/05, Alec Carlson <email@hidden> wrote:
>> > Now, when device data is read in the NSFileHandle background thread,
>> > NSFileHandle posts an NSFileHandleReadCompletionNotification notification.
>> > My question is, are these notifications executed in the context of the
>> > NSFileHandle background thread or are they executed off of the main run
>> loop?
>
> The documentation specifies that it is posted "to the client process's
> run loop". By this it means your main run loop.
>
> -- Finlay
>
-----------------------------------------------------------------------
Time is Short, and the Water Rises
-----------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden