Re: Error converting a pipe (Handler) to fd on vs 2003 to use with g_io_channel_win32_new_fd

On Fri, Aug 7, 2009 at 11:32 AM, puzzlecracker<vehomzzz yahoo com> wrote:
> The goal is to notify main application that something occurred in
> thread thread. In my case, I can't use gtk in multi-threaded way
> (calling functions of main thread from spawned one), so I am trying to
> do it via pipes.

It should be easier for you to just use g_idle_add(), this will queue
an idle function to be run in the default GMainContext (i.e. the main thread),
with a possible user data.

You can also push an idle function or timeout to run in any thread that runs
a main loop (for a thread to run a mainloop it must also declare
its own GMainContext).

there is also g_main_context_wakeup() you may find useful.


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