denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Threads and Windows version


From: Dominic Sacré
Subject: Re: [Denemo-devel] Threads and Windows version
Date: Tue, 16 Aug 2011 16:48:08 +0200
User-agent: KMail/1.13.5 (Linux/2.6.32-34-generic; KDE/4.4.5; i686; ; )

On Sunday 14 August 2011 18:30:22 Richard Shann wrote:
> I looked through a pdf on porting to windows, and the following looks
> relevant:
> 
> Threading issues
>   Don't call GTK functions from several threads
>
>   Unlike the X11 protocol, the Win32 windowing and
>
>   graphics API is thread-aware
>   Windows knows what thread created a window, and
>
>   messages (“events”) for that window are delivered to
>   that thread's event queue, etc
>   This all means horrible breakage if you create
>
>   window or do windowing API calls randomly from
>   different threads

Initially I used GTK from multiple threads in the SOC branch, protected 
by gdk_threads_enter()/gtk_threads_leave(). After I read about these 
issues in the GTK documentation, I changed the code a bit to use 
g_idle_add() for all calls from audio backend threads into the GUI parts 
of Denemo.

As far as I can tell the threading in the current version should be fine 
even on Windows, but I wouldn't be surprised if there are other 
unexpected issues on Windows...


Dominic



reply via email to

[Prev in Thread] Current Thread [Next in Thread]