Linked by Thom Holwerda on Tue 13th Oct 2009 18:24 UTC, submitted by Lazarus
FreeBSD Not too long ago, Apple open sourced its Grand Central Dispatch library, which aids in developing multithreaded code. It was suggested that it could be ported to other platforms, and the FreeBSD team has done exactly that. They have also done a lot of work related to getting GCD to work in a POSIX environment.
Thread beginning with comment 389048
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Neato
by Lazarus on Tue 13th Oct 2009 19:11 UTC in reply to "Neato"
Lazarus
Member since:
2005-08-10

It's great to see this happening. When GCD first came out, I thought it was cool, but I feared that this Apple-only thing wouldn't go very far. Fortunately, Apple have realized that to get wide adoption of GCD, they would have to open-source it.


Also of note is that Apple not only open-sourced the GCD library, but it's also Apple's intention to submit blocks as an official extension to one or more of the C-based languages.

Reply Parent Score: 3

RE[2]: Neato
by vivainio on Tue 13th Oct 2009 20:20 in reply to "RE: Neato"
vivainio Member since:
2008-12-26


Also of note is that Apple not only open-sourced the GCD library, but it's also Apple's intention to submit blocks as an official extension to one or more of the C-based languages.


This, however, is *much* more controversial than GCD. I don't expect to see much love for the feature in C programming circles, as it turns C into something completely different...

Reply Parent Score: 2

RE[3]: Neato
by tyrione on Tue 13th Oct 2009 21:34 in reply to "RE[2]: Neato"
tyrione Member since:
2005-11-21

"
Also of note is that Apple not only open-sourced the GCD library, but it's also Apple's intention to submit blocks as an official extension to one or more of the C-based languages.


This, however, is *much* more controversial than GCD. I don't expect to see much love for the feature in C programming circles, as it turns C into something completely different...
"

There seems to be plenty of love in C with the interest the LLVM project has going on with blocks and C programming.

Reply Parent Score: 5

RE[3]: Neato
by zlynx on Tue 13th Oct 2009 21:35 in reply to "RE[2]: Neato"
zlynx Member since:
2005-07-20

Not completely different.

AFAIK, "blocks" is a bit of syntactic sugar that makes it much easier to write:

struct anon_func_1_state_s {
scope_var_a_type a;
scope_var_b_type b;
int c;
int d;
};

void anon_func_1(void *state)
{
...
}

const struct anon_func_1_state_s anon_func_1_state = {scope_var_a, scope_var_b, 3, 4};
dispatch_async_f(queue, &anon_func_1_state, &anon_func_1);

But behind the scenes a block is exactly the same as the above, and a heck of a lot easier to write.

Again, AFAIK.

Reply Parent Score: 3