Tuesday, September 25, 2012

GJSieve 2.02 - back to basics

I have eliminated the "first factor finder" loop I had tried to implement in GJSieve 2.0. It simply makes more sense to test only up to the square root, even in verbose mode. There is no reason to go all the way up to the first quotient found, as it will return and print the quotients as it finds factors anyway.

Additionally, the dual-loop system was simply causing too many problems with communication and the like.

I am now using only four thread structures - one for info and handles used across threads, and three thread information/variable structures (one for each actual testing thread).

That all said, I am STILL having the issue where I cannot stop a test, clear out the boxes, and then start a new test.

I am, however, on the verge of figuring it out (I hope). It almost definitely has something to do with the way in which thread structures are kept in memory and the way the stop event is signaled (set) and signaled (reset). I just can't quite figure out what.

Currently, the way I have it set up is not really working either. In fact, only one thread appears to actually stop (the second one) - this makes absolutely no sense! I will admit, however, that I am not incredibly familiar with synchronization...so that is probably why.

Just thought I'd check in again, since lately I've either not been posting much or I've been posting about the Mac versions on which I've been focusing. Considering that as of late I've run into a pretty obnoxious localization problem, I may as well go back to the Windows apps I've let sit in their unfinished and problem-ridden state for going on three weeks!

No comments:

Post a Comment