octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44485] GUI: File | Exit from main menu doesn'


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #44485] GUI: File | Exit from main menu doesn't work when Octave is busy
Date: Sun, 08 Mar 2015 17:08:22 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #3, bug #44485 (project octave):

Note that there was a change recently in order to make the exit via command
line, i.e., typing "exit" in the command window, and exit via GUI, i.e.,
selecting File | Exit follow a consistent path when doing the shutdown
sequence (i.e., check if files need to be saved, etc).  Otherwise, the
coordination of such a thing is very convoluted because the GUI needs some
type of state variable to decipher where the exit came from, how to stop the
Octave core thread from stopping if user wants to cancel, and so on.  The
consistent exit-via-command is much easier to deal with.

That said, making the user issue a Cntrl-C to exit the running command is much
better than forcing the worker process to close and thereby possibly losing
minutes or hours of run time.  However, the best way to do this, and it isn't
difficult, just need time, would be if the GUI File | Exit event happens in
addition to placing "exit" in the queue is to create a Qt timer and connect a
slot to its expiration that will put up a dialog box and ask if the worker
Octave thread should be interrupted thereby confirming exit in the process as
well.  Set the timer for, say, three second.  The shutdown will then go
forward because of the queued exit command.  So there is a little logistics to
deal with, but it is all within the GUI's realm so-to-speak rather than having
to balance what is going on in two threads.

I can look at this later if no one else has bandwidth, but it might be a
couple days.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44485>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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