Re: Best and esiest to implemet pthread , GLib::Thread , GLib::Dispatcher

2012-01-01 Thread jonathon
should implement pthread , GLib::Thread or GLib::Dispatcher ?! ___ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list

Best and esiest to implemet pthread , GLib::Thread , GLib::Dispatcher

2011-12-31 Thread Kaiser .
,,,) Window has progressBAR CURL is object on APP and APP is object on WINDOW which one I should implement pthread , GLib::Thread or GLib::Dispatcher ?! ___ gtkmm-list mailing list gtkmm-list@gnome.org http

Re: Best and esiest to implemet pthread , GLib::Thread , GLib::Dispatcher

2011-12-31 Thread Michael Moorman
Hi Kaiser, This one way I would approach this problem. 1. Launch a GLib::Thread to download the files. The API is quite nice and easy to use. 2. Register a timeout function on the main gtk loop that periodically checks (maybe once every half second) on the status of the thread you launched

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-18 Thread Chris Vine
into a Glib:: mutex, although in principle there shouldn't be any problem in using a std:: mutex to wake up a Glib:: thread, or vice versa. (This may depend on the specific implementation of the library you use.) It's also possible that one or the other have particular per-thread init or cleanup

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-17 Thread Chris Vine
On Sun, 16 Oct 2011 23:35:07 +0100 Chris Gordon-Smith c.gordonsm...@gmail.com wrote: Hello Chris Thanks for this. Yes - I've used Glib::Dispatcher, thanks to a large degree to your posting to this list back in March! I have used Glib::Thread to give myself a GUI Thread and a simulation

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-17 Thread Murray Cumming
On Mon, 2011-10-17 at 21:57 +0100, Chris Gordon-Smith wrote: Thanks. This makes sense to me. I agree that Glib should eventually drop its own threading implemention. As things stand now, the requirement for GTKmm programmers to use Glib::Thread impedes the adoption of the standard - std

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-17 Thread Chris Vine
On Mon, 17 Oct 2011 21:57:00 +0100 Chris Gordon-Smith c.gordonsm...@gmail.com wrote: [snip] So the way ahead for my project is:- * Continue using Glib::Thread and Glib::Dispatcher to keep two separate Glib threads in my program - one for the GUI and one for the simulation

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-17 Thread Chris Vine
programmers to use Glib::Thread impedes the adoption of the standard - std::thread. Then this is something that someone should talk to the glib developers about. Glib::Thread doesn't impede the use of std::thread or C threads, and it now appears that there is now no intention to do so

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-17 Thread Chris Gordon-Smith
if using glib 2.32, in order to make glib thread safe, and use Glib::Dispatcher for inter-thread communication, and you are ready to go. Hmmm. Are you saying that instead of calling Glib::Thread::create, I could call the equivalent for std::thread? If feasible, it would be a definite

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-17 Thread Chris Vine
On Mon, 17 Oct 2011 23:40:01 +0100 Chris Gordon-Smith c.gordonsm...@gmail.com wrote: [snip] Hmmm. Are you saying that instead of calling Glib::Thread::create, I could call the equivalent for std::thread? If feasible, it would be a definite improvement over what I am currently doing. Yes

RE: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-17 Thread Gavin Lambert
there shouldn't be any problem in using a std:: mutex to wake up a Glib:: thread, or vice versa. (This may depend on the specific implementation of the library you use.) It's also possible that one or the other have particular per-thread init or cleanup requirements which won't be met by the other (I

Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Chris Gordon-Smith
Hello All I have recently introduced multi-threading into my artificial chemistry simulator, so that the GUI can be active while the simulation is running. To do this, I've used Glib::Thread. Now that C++11 provides threading with std::thread, I would prefer to use that. Is it possible to use

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Harry van Haaren
Hi Chris, From experience: Of course it is, if you 1. mutex critical sections or 2. lock-free ringbuffer all events between the threads, there's no reason you can't use 2 (or more) different types of threads in one app. From a practical point of view, why would you? Glib::Thread should

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Chris Gordon-Smith
to a small section of code, but I would have preferred not to do this at all. My question is: Could I have avoided use of Glib::Thread altogether, and just used std::thread? I think probably not, but thought I would ask. Chris Gordon-Smith www.simsoup.info On Sun, 2011-10-16 at 17:44 +0100, Harry van

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Harry van Haaren
ringbuffer all events between the threads, there's no reason you can't use 2 (or more) different types of threads in one app. From a practical point of view, why would you? Glib::Thread should suffice for simulator / GUI separation... Perhaps I'm not following your use-case, or maybe

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Harry van Haaren
wrapper classes to limit the scope of the dependency to a small section of code, but I would have preferred not to do this at all. My question is: Could I have avoided use of Glib::Thread altogether, and just used std::thread? I think probably not, but thought I would ask. Chris Gordon

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Chris Gordon-Smith
, but I would have preferred not to do this at all. My question is: Could I have avoided use of Glib::Thread altogether, and just used std::thread? I think

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Chris Vine
On Sun, 16 Oct 2011 19:44:53 +0100 Chris Gordon-Smith c.gordonsm...@gmail.com wrote: My question is: Could I have avoided use of Glib::Thread altogether, and just used std::thread? You can use C++11 threads fine with glib/glibmm, because the C++ standard library will almost certainly use

Re: Can a Multi-Threaded GTKMM Application Use std::thread Rather Than Glib::Thread?

2011-10-16 Thread Chris Gordon-Smith
Hello Chris Thanks for this. Yes - I've used Glib::Dispatcher, thanks to a large degree to your posting to this list back in March! I have used Glib::Thread to give myself a GUI Thread and a simulation thread, so that my GUI remains active even while the simulation is running. I now have

Re: Glib::Thread

2010-06-08 Thread Krzysztof KosiƄski
2010/6/8 Adam Chyla [PL] adam.ch...@gmail.com: Hi. I'm trying to run my program with one thread. Only window is not responding, theards still works. I don;t known what is wrong. I think the problem is that you are trying to modify the label from a different thread than the one that created

Glib::Thread

2010-06-07 Thread Adam Chyla [PL]
Hi. I'm trying to run my program with one thread. Only window is not responding, theards still works. I don;t known what is wrong. Please look at this: http://wstaw.org/w/6z7/ http://wstaw.org/w/6z8/ There is a code: http://svn2.xp-dev.com/svn/bandyta/ When I run my code with

Glib::Thread::create() thread safety

2008-01-25 Thread Chris Vine
the relevant trackable_callback from the list by calling std::listsigc::trackable_callback::erase(). If (see [1] below) slots do behave in this way, it would follow that thread creation in glibmm using Glib::Thread::create() is not thread safe where the callback invoked is a non-static method of a class

Glib::Thread::create

2007-04-29 Thread Norbert Bauer
Hi, i would like to pass an argument (a pointer) to a thread (using Glib::Thread::create). In the class reference there is mentioned that i can do this using sigc::bind() Has anybody a short example for me how to do this or a link to an example? I'm working under windows and use Glibmm 2.4

Re: Glib::Thread::create

2007-04-29 Thread Niko Demmel
On 29/04/2007 14:40, Norbert Bauer wrote: i would like to pass an argument (a pointer) to a thread (using Glib::Thread::create). In the class reference there is mentioned that i can do this using sigc::bind() Has anybody a short example for me how to do this or a link to an example? I'm

Re: Mixing Glib::Thread and pthread_*

2007-01-19 Thread Daniel Elstner
Am Donnerstag, den 18.01.2007, 19:14 +0100 schrieb Daniel Elstner: Am Donnerstag, den 18.01.2007, 18:34 +0100 schrieb Andreas Volz: Ok, is there a way to find out the Glib thread model at runtime and/or compile time? Well, unless you implement your own backend (Glib::thread_init() takes

Re: Mixing Glib::Thread and pthread_*

2007-01-18 Thread Andreas Volz
Am Wed, 17 Jan 2007 19:54:22 +0100 schrieb Daniel Elstner: Am Mittwoch, den 17.01.2007, 19:43 +0100 schrieb Andreas Volz: Hello, is it possible to mix the use of Glib::Thread and the C pthread_* API? The problem is that I use an API (gpsd) that needs a pthread_t as argument. In my

Re: Mixing Glib::Thread and pthread_*

2007-01-18 Thread Daniel Elstner
Am Donnerstag, den 18.01.2007, 18:34 +0100 schrieb Andreas Volz: Is Glib::Thread always implemented with pthreads? Also on the win32 plattform? Do I get problem while porting my application to win32? Likely, yes. Though pthreads are probably more or less supported on Cygwin, you'll

Mixing Glib::Thread and pthread_*

2007-01-17 Thread Andreas Volz
Hello, is it possible to mix the use of Glib::Thread and the C pthread_* API? The problem is that I use an API (gpsd) that needs a pthread_t as argument. In my application I have yet several Glib::Thread's. Are their potential problems by mixing both models? Is Glib::Thread always implemented

Re: Mixing Glib::Thread and pthread_*

2007-01-17 Thread Daniel Elstner
Am Mittwoch, den 17.01.2007, 19:43 +0100 schrieb Andreas Volz: Hello, is it possible to mix the use of Glib::Thread and the C pthread_* API? The problem is that I use an API (gpsd) that needs a pthread_t as argument. In my application I have yet several Glib::Thread's. Are their potential

Re: Glib::Thread Gtk::Window

2006-03-15 Thread Alexander Volosatov
Alexander [EMAIL PROTECTED] wrote: Hi everybody! I need to have more than one window in program, working at the same time. In Main window I have table with windows title, address for manipulation with windows. I use Glib::Thread to create threads for new window: Main_Window::Main_Window

Re: Glib::Thread Gtk::Window

2006-03-15 Thread Alexander Volosatov
Strange behavior of Gtk::Main::run(). when I wrote: void Main_Window::on_Show_clicked() /*button signal_clicked()*/ { Gtk::Window wnd; Gtk::Main::run(wnd); } it work OK. Every time when I press button method create new window. But when I connect() this method to Gtk::ActionGroup and

Glib::Thread Gtk::Window

2006-03-14 Thread Volosatov Alexander
Hi everybody! I need to have more than one window in program, working at the same time. In Main window I have table with windows title, address for manipulation with windows. I use Glib::Thread to create threads for new window: Main_Window::Main_Window() { Glib::thread_init

Re: problem with exiting from a Glib::Thread

2005-06-26 Thread Yair Hershkovitz
: i call throw Glib::Thread::Exit() to exit from a thread, what happens is: glibmm-ERROR **: unhandled exception (type unknown) in signal handler aborting... this happens to me on every program i wrote that uses glib's threads I have never thrown that exception to exit a thread and I

Re: problem with exiting from a Glib::Thread

2005-06-26 Thread Chris Vine
environmental variable exported: LD_ASSUME_KERNEL=2.4.19 In Redhat and Suse at least this forces NPTL to adopt Linuxthreads behaviour (that is, it prevents forced stack unwinding) and it probably does the same with your distribution, so if Glib::Thread::Exit works correctly with this variable set

problem with exiting from a Glib::Thread

2005-06-25 Thread Yair Hershkovitz
i call throw Glib::Thread::Exit() to exit from a thread, what happens is: glibmm-ERROR **: unhandled exception (type unknown) in signal handler aborting... this happens to me on every program i wrote that uses glib's threads yair ___ gtkmm-list

Re: problem with exiting from a Glib::Thread

2005-06-25 Thread Chris Vine
On Saturday 25 June 2005 12:58, Yair Hershkovitz wrote: i call throw Glib::Thread::Exit() to exit from a thread, what happens is: glibmm-ERROR **: unhandled exception (type unknown) in signal handler aborting... this happens to me on every program i wrote that uses glib's threads I