|
From: | John Swensen |
Subject: | Re: Yet another GUI releated thought |
Date: | Mon, 12 May 2008 23:24:14 -0400 |
On May 12, 2008, at 11:19 PM, Ryan Rusaw wrote:
On Mon, May 12, 2008 at 9:29 PM, John W. Eaton <address@hidden> wrote:On 9-May-2008, Przemek Klosowski wrote:| Now, a somehow ugly compromise might be to introduce synchronization| points, either implicit in the octave eval loop or explicit in user | code (process_gui_callbacks()) I think that's what John Swensen's IDE does now. jweWould it not be possible to allow the various IDE's to register code to be called on each iteration of the octave eval loop at startup? Then leave it to each IDE development team to determine what functionality they need themselves ie. updating a variable watch window in the IDE via a data socket or other IPC mechanism. Ryan
This mechanism is already in place. A while back John Eaton cleaned up my patch to allow multiple "clients" to register for the Readline idle event. I currently have a class sources for my IDE called octave_server that is a singleton and registers a function with this idle loop. Whenever the function is called, there is a transaction between the server class and octave (gets new history items, gets a table of whos-like variable information, processes breakpoint additions and hits, requests variables, etc). Then the IDE is free to query these values from the octave_server class whenever it feels like it. Since the data in the octave_server class is mutex protected, and we can guarantee that the octave_server class only interacts with Octave while the octave interpreter is in the Readline idle loop (e.g. nothing is being executed), then this is as much "thread-safety" as most IDE's will need.
John Swensen
[Prev in Thread] | Current Thread | [Next in Thread] |