Le 14 juin 09 à 13:07, David Chisnall a écrit :

> In case anyone hasn't seen this, Apple have published a few more
> details about Grand Central:
>
> http://images.apple.com/macosx/technology/docs/GrandCentral_TB_brief_20090608.pdf
>
> There is no API documentation yet,

I bet they use NSOperation and NSOperationQueue with some new additions.
I strongly hope at least :-) It would be a bit crazy to introduce a  
new a API.

> but it seems that it basically
> spawns a set of threads at different priorities and uses them to run
> blocks from various queues.  Lots of hype, but it doesn't seem to give
> anything that we can't already do with EtoileThread and clang (we
> already have an implementation of blocks and an efficient way of
> passing objects between threads - see ETThread and MKObjectPipe).

The most interesting thing seems to be that Grand Central is system- 
wide.
I suppose it consider the entire system to decide whether to create a  
new thread or not, whether to schedule this operation rather this one  
etc.
I'd be curious to look at what Grand Central really considers when a  
choice has to be made.
It's impossible on our side to do something at the system level, but  
we surely don't need that to perform well enough.

> The most important improvement is hidden right at the bottom of the
> document; there is now a queue associated with the main thread, so
> there is a standard way of running arbitrary code at the end of the
> next run loop.

I thought there was already a queue associated with the main thread  
since -performSelectorOnMainThread:withObject:XXX is available. It's  
fairly limited though, you can only pass a single argument and nothing  
can be returned. If they have generalized this mechanism to allow  
arbitrary message passing/queueing between threads (without resorting  
to DO), this would be really nice.

Cheers,
Quentin.
_______________________________________________
Etoile-dev mailing list
Etoile-dev@gna.org
https://mail.gna.org/listinfo/etoile-dev

Reply via email to