octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rethinking interpreter <-> gui interaction


From: PhilipNienhuis
Subject: Re: rethinking interpreter <-> gui interaction
Date: Tue, 2 Jul 2019 12:50:00 -0500 (CDT)

John W. Eaton wrote
> Currently, most communication between the Octave interpreter and GUI is 
> managed by the octave_link class interface defined in the interpreter. 
> The actions specific to the GUI are implemented in the GUI by the 
> octave_qt_link class.  These classes provide a thread-safe way for 
> interpreter and GUI to ask each other to perform actions.  For example, 
> the interpreter may notify the GUI that the workspace has changed so 
> that the workspace view in the GUI may be updated.  Or the GUI may ask 
> the interpreter to invoke a function to change the current directory.
> 
> As I understand it, there are four cases that may need to be handled:

<1-3 snipped>


>    4. The GUI asks the interpreter to perform an action and requires an 
> immediate result.  The GUI thread must be suspended and wait until the 
> interpreter thread is finished with the action.  Although this type of 
> interaction is possible, I'm not sure what examples of it that we 
> currently have, or whether any that we do have could be rewritten to 
> behave like item 3 above so that the requested action is performed by 
> the interpreter and the GUI is notified of the result using a separate 
> signal sent from the interpreter.

Maybe changing a value in the Variable Editor could belong to case 4?

It might be debatable at what moment the new value is to be conveyed to the,
or a, running interpreter, and even more debatable whether it should be
allowed at all to (be able to) change vales in the V.E. while the
interpreter is busy.
But then again, if the interpreter's actual business is not immediately
affected by the new variable value it could be permitted - and maybe it is
even desirable e.g. in debug sessions. Maybe requiring that the interpreter
is temporarily halted (pause or so) could make it a better scenario, but
then we're probably back at one of the other cases.

Philip




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]