GCD code in plain old C, and a correctness question
GCD code in plain old C, and a correctness question
- Subject: GCD code in plain old C, and a correctness question
- From: David Leimbach <email@hidden>
- Date: Mon, 7 Sep 2009 19:56:45 -0700
Aside from having to bump up my file descriptors to run this code, I'm not sure why I'm getting "????" at the end of the code linked here:
Otherwise it appears to function properly.
I'm basically writing a concurrent prime number sieve using libdispatch data structures, and using pipe fds to sort of simulate an "actor message passing style" by tying together event sources on the read end of a pipe pair of fds. Since none of the sources or contexts know when the computation is complete by the amount of data they've received, I send a -1 through the entire sieve of blocks to cause shutdown to occur. ) If you look at my earlier versions of this code, I was using a sleep call). Even this new version of the code seems to function up until the "????".
I'm trying to decide if this is a bug on my part or not.
Also, running this without bumping the ulimit for fds caused my Snow Leopard machine to kernel panic just once. So if you run this, please do so with that caveat. I've been as of yet unable to reproduce this crash, but I'll file a bug report if I do.
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden