Re: Glib::SignalIO Help
- From: Michael Sierks <msierks sierkstech net>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: gtkmm-list gnome org
- Subject: Re: Glib::SignalIO Help
- Date: Mon, 15 Nov 2010 12:06:05 -0600
On 11/12/2010 04:30 PM, Chris Vine wrote:
On Fri, 12 Nov 2010 15:42:27 -0600
Michael Sierks<msierks sierkstech net> wrote:
[snip]
well there is the main gui thread, which will handle updating the
gui. And there is the connection thread, which will handle
sending/receiving as well as maintaining any connection related data.
The plan is to have the connection thread emit signals to tell the
gui thread to update itself. I am hoping this is a good approach,
though I am still a little unsure. The plan was at a later time allow
multiple connections to be made, each on their own thread.
That should be fine with glibmm, if you use Glib::Dispatcher to
communicate with the main thread and use some kind of asynchronous
queue to pass the data. That didn't seem to be what your code snippet
was doing though. Does your worker thread have its own main loop?
Chris
PS It is a good idea to put the mailing list on the copy list
Sorry, The thread doesn't have its own main loop. Currently it just
monitors the socket for data to read. Though I could be mistaken,
wouldn't that count as having a main loop ? Using threads seems to be
pretty complicated, I also thought they were necessary for this
application. Should I be using threads like this with a program that is
network intensive ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]