Re: RunLoop Tutorials
Re: RunLoop Tutorials
- Subject: Re: RunLoop Tutorials
- From: Bing Li <email@hidden>
- Date: Tue, 17 May 2011 04:31:59 +0800
In fact, I have rich experiences in Java and .NET. I use them to program a
lot of low level distributed systems.
However, I noticed that a lot of my past experiences could not be reused
when programming with Cocoa.
On Tue, May 17, 2011 at 4:13 AM, Alex Kac <email@hidden> wrote:
> There are tons of docs on runloops. Check out NSRunLoop and CFRunLoop. But
> still, if you use a good framework, you really don't need to deal with them
> directly much. For example, GCDAsyncSocket is a great network class (there
> are many others) that handle a lot of this for you. Most of the tutorials on
> Cocoa networking classes tell you what little you really need to know.
> Again, its good to understand them, but it sounds like you're asking to run
> before you can walk.
>
> I did a Google search and found tons of info:
>
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html
> http://www.mikeash.com/pyblog/friday-qa-2010-01-01-nsrunloop-internals.html
> http://www.cocoadev.com/index.pl?RunLoop
>
>
> On May 16, 2011, at 3:07 PM, Bing Li wrote:
>
> Dear Alex and Matt,
>
> Since I need to implement a peer-to-peer TCP model, I think the system
> level programming is required.
>
> Unfortunately, I have got any books giving enough explanations to RunLoop.
> Most books even never talk about it.
>
> Apple provides a document. However, the sample code is not complete. I
> cannot understand well. RunLoop code looks weird.
>
> I am not sure if you have some better resources for me to follow?
>
> Best,
> Bing
>
> On Tue, May 17, 2011 at 3:44 AM, Alex Kac <email@hidden> wrote:
>
>> To be fair, a new Cocoa developer doesn't need to worry about runloops.
>> Cocoa handles all that for you in most cases. Its good to understand when
>> you understand all the rest of the basics, but its like learning how to
>> drive a car and asking about the specifics of drivetrain operation.
>>
>> On May 16, 2011, at 2:32 PM, Matt Neuburg wrote:
>>
>> > On Mon, 16 May 2011 21:31:18 +0800, Bing Li <email@hidden> said:
>> >>
>> >> although I have
>> >> got to know the term, RunLoop, when starting to learn Cocoa for two
>> months,
>> >> until now I have not seen a sample code about RunLoop in any resources.
>> So I
>> >> don't know how to program with it.
>> >>
>> >
>> > When I search on NSRunLoop in Xcode, I get 50 or 60 sample code
>> projects. I'm not saying that all of these would show you what you want to
>> know (most of them are about adding a timer or a stream), but to claim that
>> there is *no* sample code involving run loops seems a bit over the top. m.
>> >
>> > --
>> > matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
>> > A fool + a tool + an autorelease pool = cool!
>> > Programming iOS 4!
>> >
>> http://www.apeth.net/matt/default.html#iosbook_______________________________________________
>> >
>> > 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
>>
>> Alex Kac - President and Founder
>> Web Information Solutions, Inc.
>>
>> "Patience is the companion of wisdom."
>> --Anonymous
>>
>>
>>
>>
>>
>
> *Alex Kac - **President and Founder*
> *Web Information Solutions, Inc. *
>
> "If at first you don't succeed, skydiving is not for you."
>
> -- Francis Roberts
>
>
>
>
>
>
_______________________________________________
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