From: Ethan A M. <merritt@u.washington.edu> - 2004-01-10 22:52:11
|
On Saturday 10 January 2004 01:07 pm, Petr Mikulik wrote: > cannot be something modern used to get rid of these > problems? E.g. pthreads. There can be a thread waiting for mouse/hotkey > actions, and it may be triggered by mutexes or semaphores. Putting all the mouse handling in a separate thread would work (I think). I don't at the moment see how it would work for hotkeys, though. A hot-key triggered command should be treated identically to the same thing typed from the command line, including effects on subsequent plotting commands. Is that possible with pthreads? That is, are changes to global variables in one thread seen by the others? > Get rid of stdin to gnuplot_x11 and use named pipe or fifo. I am not aware of a problem with the input stream to gnuplot_x11. What did you have in mind? The problem we have at the moment is with multiple inputs to gnuplot itself. > Or would this mean big non-portability to different X11 systems? I don't know. But if we were going to move to a threaded implementation of gnuplot, I would want to look at making even larger scale use of it. For example, would it make any sense to spawn off a new thread for each new plot? That would be an easier way to achieve multiple active plots than Dan's current dream of making all the internal data structures into linked lists. -- Ethan A Merritt Department of Biochemistry & Biomolecular Structure Center University of Washington, Seattle |