> On 4 Jul 2016, at 14:34, Gerriet M. Denkmann <[email protected]> wrote:
> 
> 
>> On 4 Jul 2016, at 12:00, Charles Srstka <[email protected]> wrote:
>> 
>>> On Jul 3, 2016, at 11:35 PM, Gerriet M. Denkmann <[email protected]> 
>>> wrote:
>>> 
>>> When I get an NSStream I do:
>>> 
>>> aStream.delegate = myStreamDelegate;
>>> [ aStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode: 
>>> NSDefaultRunLoopMode];
>>> [ aStream open];
>>> 
>>> myStreamDelegate then receives stream:handleEvent: messages.
>>> 
>>> The documentation says: “The message is sent on the stream object’s thread."
>>> 
>>> Actually it is sent on the main thread.
>>> 
>>> How can I set the “stream object’s thread” ?
>>> 
>>> Gerriet.
>> 
>> What thread is the run loop on?
> 
> Well, seems like the main thread?
> 
> Gerriet.
> 

So schedule it on a runloop in a thread other than main then. Obviously if you 
schedule something in a runloop you are going to get calls from the thread 
which is running that runloop. 


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to