From: Arjen M. <Arj...@de...> - 2015-01-14 10:53:18
|
Hi Sergei, > -----Original Message----- > From: Sergei Naumov [mailto:vo...@ra...] > Sent: Tuesday, January 13, 2015 5:45 PM > To: Arjen Markus > Cc: plp...@li... > Subject: RE: RE: RE: RE: RE: [Plplot-general] Plotting from multithreaded > environment > > > > > I do not know anything about the GTK multithreading capabilities, so what I would > like to know is, where are the threads introduced, is that in g_timeout()? > > But I would think that it initialises a single extra thread. Plplot > > itself is not threadsafe, that is, you should not use the functions from different > threads at the same time, but I would imagine that global variables (as maintained by > the Plplot library) are accessible in any thread. Hence, there should be no problem. > > The call simply creates a new thread that executes a specified function every N > seconds. In my case it is 15. All other variables and structures declared globally in > my code are accessable from inside. There seem to be nothing unusual about it. > Indeed, that seems rather straightforward. > > What happens if you use the PSC device? That produces a file on disk. > > It seems I did sometging wrong... But it produced a file with nothing in it. > > [serge@yaro c]$ ./ext > Enter graphics output file name: oo > > *** PLPLOT ERROR, ABORTING OPERATION *** > plvpor: Invalid limits, aborting operation > > *** PLPLOT ERROR, ABORTING OPERATION *** > plwind: Please set up viewport first, aborting operation > > *** PLPLOT ERROR, ABORTING OPERATION *** > plbox: Please set up window first, aborting operation The error messages indicate that Plplot was not properly initialized - at least according to the underlying routines. Since it has been initialized, I am beginning to doubt whether the internal structures are indeed accessible. But that is just a hunch and I have no idea how that would come about. Hm, perhaps I can try this in a small C program myself, apart from GTK. Regards, Arjen DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |