|
From: Ethan M. <merritt@u.washington.edu> - 2004-09-27 22:30:32
|
On Monday 27 September 2004 03:27 pm, Daniel J Sebald wrote: > > Ethan Merritt wrote: > > >I'm a bit worried about races if you mix scheme (a) with the replots > >done under scheme (b). > > > I thought I saw that the core of gnuplot of x11 looks at events and then > handles them, handles drawing commands, etc. So, I think the scenarios > you mention above should all complete before a next operation can take > place. I don't think so. The main loop does a select() at line 817 of gplt_x11.c that mixes input from the pipe (line 849) and from X events (line 844). I see nothing to stop an X event from slipping in between two successive reads from the input pipe. > That is, gnuplot_x11 is the one actually closing > plots and X windows, somewhere in its event cycle. The outside error > events are just requesting that gnuplot_x11 close windows, etc. Not be relevant to the current point, but that's not true either. Yes, if you type "q" or "ctrl-q" then it's gnuplot_x11 that actually closes the plot window. But if you select XKill or some window manager function to close the plot window then I think it's already gone by the time gnuplot_x11 finds out about it. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |