add isThinking flag and mutex to try to solve the problem of overlapping calls to calling red thinker.Think().  This is kludgy, but so far it seems to have solved the problem.