Neil Hodgson wrote:

I switched the order of your replies.

  Yes, and I'm going to be a bit protective with this feature as it
is easy to get threaded code wrong.
Hello Neil.

I want to emphasize that I'm thinking out loud here, with little to back this up.

Instead of having (abbreviated):
   if (jobToRun.jobType == jobExtension) {
       if (extender) {
if (jobToRun.flags & jobGroupUndo) SendEditor(SCI_BEGINUNDOACTION);
           extender->OnExecute(jobToRun.command.c_str());
if (jobToRun.flags & jobGroupUndo) SendEditor(SCI_ENDUNDOACTION);
           Redraw();
       }
       return exitcode;
   }
move the part inside the inner braces into a function by itself, and replace it by code that creates a thread to call that function?

Would this not then get the extension system into its own thread? As long as the extension system respects the job queue, the command can call the Execute method.


  The user interface blocks tool commands while a tool is running.
This is determined by the 'executing' field which is reset when the
tool thread posts a IDM_FINISHEDEXECUTE message back to the UI.
Does this mean that a running command-line/gui tool blocks an extension tool?

April

---

No sense being pessimistic. Wouldn't work anyway...

_______________________________________________
Scite-interest mailing list
Scite-interest@lyra.org
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to