Friday, September 14, 2012

Multi-threading on Mac

I just took a look at the NSThread class in Objective C and successfully implemented it for testing large numbers in IsItPrime. It supports stopping the test, but not pausing/resuming.

From what I understand, it is unsafe to sleep and resume a thread in Objective-C. The way to do it would be using a thread pool with worker threads and a central delegate which would provide them with functions containing different testing ranges.

That would be a lot of work. A lot of work. But that's not to say I will never get to it. The year is still quite young.

The next step is to implement the same practice in GJSieve for Mac.

After that, I can finally begin work on MuPuPriNT 0.7a for Mac. This will include GJSieve for Proth, Cullen, Woodall, and Pythagorean numbers. This will also forgo the "chooser" window in favor of a series of check boxes and stuff like that.

And it's Friday, meaning I should hopefully be able to work a lot this weekend!

No comments:

Post a Comment