On Thu, Sep 18, 2008 at 6:28 AM, Duncan Murdoch <murdoch@stats.uwo.ca>wrote:

> On 18/09/2008 8:59 AM, Michael Lawrence wrote:
>
>> For processing events, RGtk2 has moved away from using the old tcl_do hack
>> and now synchronizes on the Windows event loop. In Rgui.exe this works
>> fine
>> (well mostly), but in Rterm.exe, users report the following warning from
>> GLib: "main loop already active in another thread". The most obvious way
>> this could occur is if the Windows event loop were iterating in multiple
>> threads. This does not seem to be the case from my casual inspection of
>> the
>> R source.
>>
>
> Rterm sets up separate threads to handle Windows messages and console
> input, so that the graphics devices can be updated while the console is
> waiting for input.  You can see the source in src/gnuwin32/system.c: look
> for "lineavailable", which indicates that the reader thread has read
> something.


Thanks yes I saw that, but it doesn't iterate the Windows event loop from
the other thread. After some testing, it now looks like this has nothing to
do with R, but just a conflict with GTK+, specifically its dialogs which
iterate the event loop themselves, not knowing that I'm doing the same in
another thread.

Thanks,
Michael



>
>
> Duncan Murdoch
>
>

	[[alternative HTML version deleted]]

