Hello,
My program was already written using single thread and approach you
described (using g_idle_add and poll). One of the functions of the program
is audio transmission (to and from network-connected hardware device using
special protocol), and it is required to receive and send packets with
sp
Gus Koppel wrote:
[...]
BTW, can I use g_idle_add in non-main thread without locking ?
I am not sure. The documentation is not clear about this and I havn't
had the time to examine the sources of that yet. To be safe, you should
wrap a simple GStaticMutex lock around the call.
g_idle_add() i
Gus Koppel wrote:
> Vladimir wrote:
>
> > There are two uses of GTK+ in non-main threads:
> > 1. error reporting via message boxes and
> > 2. adding text (which comes from network) to GUI windows.
>
> Btw, if you don't use modal message box dialogs then there is absolutely
> no need to use mult
Vladimir wrote:
> There are two uses of GTK+ in non-main threads:
> 1. error reporting via message boxes and
> 2. adding text (which comes from network) to GUI windows.
Btw, if you don't use modal message box dialogs then there is absolutely
no need to use multiple threads (aka one to receive, t
Vladimir wrote:
> Gus Koppel wrote:
>
> > There shouldn't be any additional buffer copying required just because
> > dealing with it moves from one thread to another. You know, all threads
> > have the same access to all program data.
>
> Yes, but in my case buffers are reused to recv next packe
Gus Koppel wrote:
> There shouldn't be any additional buffer copying required just because
> dealing with it moves from one thread to another. You know, all threads
> have the same access to all program data.
Yes, but in my case buffers are reused to recv next packets from network, so
copying (or
Vladimir wrote:
> Thanks a lot for comprehensive explanations.
>
> There are two uses of GTK+ in non-main threads:
> 1. error reporting via message boxes and
> 2. adding text (which comes from network) to GUI windows.
>
> I can do both of it in main thread but this involves copying text to
> dy
Thanks a lot for comprehensive explanations.
There are two uses of GTK+ in non-main threads:
1. error reporting via message boxes and
2. adding text (which comes from network) to GUI windows.
I can do both of it in main thread but this involves copying text to
dynamically allocated buffers.
BTW
Vladimir wrote:
> I'm writing program with several threads each of which uses gtk.
> I need to wait for one of the threads in gtk-generated callback. I can't do
> it directly because of gdk lock. So the question is: can I temporarily
> release gdk lock in gtk-generated callback ? Will it cause any
Hello,
I'm writing program with several threads each of which uses gtk.
I need to wait for one of the threads in gtk-generated callback. I can't do
it directly because of gdk lock. So the question is: can I temporarily
release gdk lock in gtk-generated callback ? Will it cause any problems ?
--
10 matches
Mail list logo