Hi everybody,
can a cell somehow ask to be evaluated in the future?
I have a cells-gtk application. Some calculation take quite a time which makes the gui quite unresponsive. I'd like to have pseudoparallelism within the cell layer.
One hack I thought about is to introduce a timer-cell that is updated from within gtk's main loop. A c-sleep function would explicitly request those updates. Taken together this would make for a tiny scheduler.
Every comment is appreciated. Thanks in advance. Ingo. ______________________________________________________________ Jeden Monat 1 hochkarätiger maxdome-Blockbuster GRATIS! Exklusiv für alle WEB.DE Nutzer. http://www.blockbuster.web.de
On Thu, Jun 12, 2008 at 3:58 PM, Ingo Bormuth Bormuth@web.de wrote:
Hi everybody,
can a cell somehow ask to be evaluated in the future?
You can have lazy cells which will not get calculated until asked, but it sounds like you might want the calculation running while other things are going on? Or kicked off at some point? And then do you need propagation from that cell kicked off?
You might do something with Gtk timers (ISTR those) combined with an input Cell if the GTk timer mechanism is attractive for any reason.
I have a cells-gtk application. Some calculation take quite a time which makes the gui quite unresponsive. I'd like to have pseudoparallelism within the cell layer.
One hack I thought about is to introduce a timer-cell that is updated from within gtk's main loop. A c-sleep function would explicitly request those updates. Taken together this would make for a tiny scheduler.
OK, well, as per the above I am not exactly sure what is required, and it may be possible to do something in cooperation with Cells as it stands, more is hard to say without more deets.
hth, kenny
On 6/12/08, Ken Tilton kentilton@gmail.com wrote:
You might do something with Gtk timers (ISTR those) combined with an input Cell if the GTk timer mechanism is attractive for any reason.
You might look at the pulse demo on the display tab in test-gtk for an example of gtk "timeout", as they call it.
You could link that to a custom function which runs the long computations step by step. This might be ok if the long computations can be broken down to smaller atomic units.
Then you could have something like
(mapc #'iterate calculations) (setf calculations (remove-if #'done calculations)
where calculations is populated by the c?-with-iterative-solution macro. Oh, and you need to write iterate and done.
Or just use threads (from bordeaux-threads) in c?-calculate-in-thread and let the system figure out the scheduling.
Peter