[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Event queue(s) between the GUI and the interpreter
From: |
Torsten |
Subject: |
Re: Event queue(s) between the GUI and the interpreter |
Date: |
Sat, 10 May 2014 11:01:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 07.05.2014 22:07, Jordi GutiƩrrez Hermoso wrote:
> While patching bug #42307 to use Fsource directly without attempting
> to invoke the interpreter on a filename (thus getting rid of the
> problem of even considering what characters are in the filename), I
> came to the conclusion that this could be easily done by directly
> passing Fsource with the right parameters to the octave_link class.
>
> However, I'm now confused. It looks like there are two queues, one in
> the interpreter called gui_event_queue and another in the GUI called
> _cmd_processing, each with its own mutex and/or semaphore. It looks
> like the gui_event_queue gets fed with functions from the GUI (i.e.
> defined in libgui), and that _cmd_queue gets fed with actual commands
> stored as QStrings that get called from
> main_window::execute_command_callback (btw, exactly which line in this
> last function is responsible for actually executing the command?
> command_editor::replace_line?)
>
> So where exactly would I do something like call Fsource directly?
> Should I create another queue-mutex-semaphore triplet in the GUI for
> DEFUNs and feed gui_event_queue with function calls to a function like
> main_window::execute_defun_callback?
>
> This seems a bit convoluted, but par for the course for Octave code.
> :-)
I have added the _cmd_queue in order to fix bug #39723 (some commands
were lost when evaluating more than one at a time). IMHO Fsource has to
be called in its own callback function instead of run_file_in_terminal
and run_file_callback.
Torsten