Re: Multi-threaded light-server example
- From: Jens Georg <mail jensge org>
- To: gupnp-list gnome org
- Subject: Re: Multi-threaded light-server example
- Date: Thu, 18 Aug 2016 09:28:53 +0200
Everything! GUPnP-related has to be created in the worker thread after
g_main_context_push_thread_default.
Otherwise half of your call-backs end up in main thread.
Hey Everyone,
I am using GUPnP and I want to make sure I am doing all my
inter-thread calls safely. So based on what the FAQ
(https://wiki.gnome.org/Projects/GUPnP/FAQ) says I attempted to make
the light-server example program that is bundled with GUPnP
multi-threaded first as an example for myself. I have attached a full
diff of the light-server.c file. Everything works fine with this
program, but then again I couldn't force any errors before adding
g_main_context_push_thread_default() calls either so I don't trust it
yet. Would someone mind taking a quick look at the diff and make sure
I didn't miss anything (aside from the obvious pointer and error
checking that I left out for simplicity).
Thanks for you help,
Nick
_______________________________________________
gupnp-list mailing list
gupnp-list gnome org
https://mail.gnome.org/mailman/listinfo/gupnp-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]