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.
Permalink for comment 389073
To read all comments associated with this story, please click here.
RE[3]: Neato
by zlynx on Tue 13th Oct 2009 21:35 UTC in reply to "RE[2]: Neato"
Member since:

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