[PRL] Apple's new OS geared for multicore future | Deep Tech - CNET News
Jed Davis
jld at ccs.neu.edu
Sun Sep 13 18:15:54 EDT 2009
On Tue, Sep 01, 2009 at 11:38:35AM +0100, Vasileios Koutavas wrote:
>
> What I didn't see in the article is how (or whether) GCD deals with
> shared state and locking.
Now that it's been open-sourced, this question can be revisited.
Going by the documentation linked from http://libdispatch.macosforge.org/
it seems to be fairly conventional -- procedural interfaces for semaphors
and waiting for task completion and so on.
It really does seem to just be lambda and an M:N threading library with
somewhat more features than usual. I strongly suspect that it would not
be nearly as popular if people had to do closure-conversion by hand in
order to use it.
The system for globally managing how many actual threads each process
uses for its tasks is an interesting refinement of M:N threading, but I
don't know offhand how novel it is, and I have my doubts as to how
crucial it is to GCD as a whole.
--
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l)))))) (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k))))))) '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))
More information about the PRL
mailing list