Neil Hodgson wrote:

April White:
I've been going over in my head the 'executing' variable.
  Not really the same as it sets executing even if it bails out
because the queue is empty.

I found that out the hard way.

Moving executing inside jobQueue and
adding a CanExecute method with appropriate locking may be a better
approach although you could just reverse the tests.
With the locking I've added to the jobQueue, adding CanExecute() would probably be best.

Maybe a redesign of jobQueue.IsEmpty() as well. This is off the top of my head: - rewrite "if (!executing && !jobQueue.IsEmpty())" as "if (jobQueue.CanExecute()) - add the method CanExecute() which examines an internal flag IsExecuting; if it is not set, sets it and pops a job from the queue, thereby setting the flag and preparing for the actual execution - these are the first two lines of SciTEBase::Execute()
- replace any query of executing with jobQueue.IsExecuting()

This sounds good on paper, I'll try it later today.

Thank you Neil.
April

ps. Instead of downloading the 1.67 source, I can use CVS to get all of the new stuff?

--
In politics, if you want anything said, ask a man. If you want anything done, 
ask a woman.
-- Margaret Thatcher

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to