| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
The advantage with letting the run loop code handle it is that it can be updated to whatever threading/process/etc model Apple feel like using, making optimum use of it. E.g. it may not poll, but rather use interrupts of some sort (taking wild guesses here, but you get the idea). Plus, it generally makes your code shorter. :)
you are right, but i'm pretty sure apple does not optimize it at all, re reading the Chris Kane messages on this list make me think that the run call is just polling... but i'm maybe wrong!
for the moment, polling the run loop every second consumes virtually no CPU at all (mesured on my test project with top).
In fact i think the main problem with the 1 second polling is when the client messages the server (which has just polled the run loop) must wait 1 second before the server repoll the runLoop and see it has been messaged... 1 second is a HUGE delay when dealing with networks (in particular LAN !) so this slow the connection for nothing... thus, i recognize that it is not beautifully designed ;)
i'm really interested in knowing how do you control the input sources of the runLoop... how do you achieve to be *sure* there is only YOUR connection(s) as input source(s)...
great, at the time i coded this, i did not think about this, but writing my previous message i suddendly thought about the client passing "self" to register itself... thanks to have confirmed this !
your code is indeed much more simpler and cleaner !!
this open *very* wide areas to DO imho :D
i can think of several levels of data sharing : in a company, only a limited group of people can access the full data when the clients can only access a small part of the shared infos etc...
this is fantastic and give me many ideas for our current project !
| References: | |
| >Distributed Objects pitfalls and strategies (From: John Scalo <email@hidden>) | |
| >Re: Distributed Objects pitfalls and strategies (From: Aurélien Hugelé <email@hidden>) | |
| >Re: Distributed Objects pitfalls and strategies (From: Aurélien Hugelé <email@hidden>) | |
| >Re: Distributed Objects pitfalls and strategies (From: Aurélien Hugelé <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.