summaryrefslogtreecommitdiff
path: root/examples/thread/dispatcher2.cc
Commit message (Collapse)AuthorAgeFilesLines
* Glib::Dispatcher: Add const versions of emit() and operator()()Kjell Ahlstedt2023-02-221-1/+1
| | | | | and deprecate the non-const versions. Fixes #103
* Examples: Avoid a warning about unused code.Murray Cumming2016-11-051-4/+0
| | | | | | | This useful warning seems to be new in g++ 6: thread/dispatcher2.cc:88:1: error: ‘{anonymous}::ThreadTimer::~ThreadTimer()’ defined but not used [-Werror=unused-function] ThreadTimer::~ThreadTimer()
* Examples: Use libsigc++ 2.9/10 and its slot/signal<R(Args...)> syntax.Murray Cumming2016-03-311-2/+2
| | | | The older libsigc++ syntax is deprecated.
* C++11: .h/.cc files: Replace typedefs with using.Murray Cumming2016-03-311-1/+1
|
* Run clang-format on the examples.Murray Cumming2016-02-261-51/+49
|
* examples: dispatcher: Use std::thread and friends.Murray Cumming2015-11-261-13/+29
| | | | Instead of deprecated Glib::Threads::*.
* C++11: examples/tests: More use of auto.Murray Cumming2015-07-151-2/+2
|
* C++11: examples: Use nullptr.Murray Cumming2015-07-091-5/+5
|
* Revert "C++11: Use auto in examples."Murray Cumming2013-06-271-3/+2
| | | | | | This reverts commit 9b0554e2c9deca2399e654e7984c9dfe3b67e387. This was not meant to be in the master branch.
* C++11: Use auto in examples.Murray Cumming2013-06-261-2/+3
|
* Dispatcher examples: Use Glib::signal_idle().connect_once().Kjell Ahlstedt2012-03-221-14/+12
| | | | | | * examples/thread/dispatcher.cc: Use Glib::signal_idle().connect_once(). * examples/thread/dispatcher2.cc: Use Glib::signal_idle().connect_once(). Rename class Dispatcher to ThreadDispatcher. Bug #396963
* Fix exceptions thrown by Thread::create() and Threads::Thread::create.Kjell Ahlstedt2012-02-281-1/+1
| | | | | | | | | | | | | | | | | * glib/src/thread.ccg: create(): Call g_thread_try_new() instead of g_thread_new(). Throw a Glib::ThreadError when appropriate, instead of calling Glib::Error::throw_exception(), which would throw Glib::Threads::ThreadError. * glib/src/threads.ccg:create(): Call g_thread_try_new() instead of g_thread_new(). Remove parameter 'joinable'. * glib/src/threads.hg: Remove parameter 'joinable'. Remove comments about non-joinable threads and thread priorities. * examples/network/resolver.cc: * examples/network/socket-client.cc: * examples/network/socket-server.cc: * examples/thread/dispatcher.cc: * examples/thread/dispatcher2.cc: * examples/thread/thread.cc: Remove parameter 'joinable' in calls to Glib::Threads::Thread::create(). Bug #640029.
* Add Glib::Threads::* in threads.h, deprecating everything in thread.hMurray Cumming2011-11-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * glib/src/filelist.am: * glib/src/thread.[hg|ccg]: Deprecate the whole file, adding deprecation doxygen comments to all API. * glib/src/threads.[hg|ccg]: A new Threads namespace containing equivalents for everything in thread.h, implemented using only non-deprecated glib API. This was necessary because we had to break the ABI to do this. * glib/glibmm.h: Include threads.h * glib/glibmm/main.[h|cc]: Added a wait() method overload that takes the new types, deprecating the existing wait() method. * examples/network/resolver.cc: * examples/network/socket-client.cc: * examples/network/socket-server.cc: * examples/thread/dispatcher.cc: * examples/thread/dispatcher2.cc: * examples/thread/thread.cc: * examples/thread/threadpool.cc: * glib/glibmm/dispatcher.cc: * glib/glibmm/exceptionhandler.cc: * glib/glibmm/threadpool.[h|cc]: Use the new Glib::Threads::* types instead of thread.h.
* Avoid use of deprecated API in tests and examples.Murray Cumming2011-10-261-1/+1
| | | | | | | | | | | * tests/Makefile.am: * examples/Makefile.am: Disable deprecated API. * examples/network/socket-client.cc: * examples/network/socket-server.cc: * examples/thread/dispatcher.cc: * examples/thread/dispatcher2.cc: * examples/thread/thread.cc: Remove calls to Glib::thread_init(), instead calling Glib::init() where that side-effect was also intended.
* Removed the #ifdef for AIX, because sigc::bind now works on AIX.Murray Cumming2005-02-011-8/+0
| | | | | | | 2005-02-01 Murray Cumming <murrayc@murrayc.com> * examples/threadpool.cc, dispatcher.cc, dispatcher2.cc: Removed the #ifdef for AIX, because sigc::bind now works on AIX.
* Added new compiler tests to see whether extern C functions are put in theMurray Cumming2005-01-211-0/+9
| | | | | | | | | | | | | | | | | 2005-01-21 Murray Cumming <murrayc@murrayc.com> * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added new compiler tests to see whether extern C functions are put in the global namespace, even when we use extern C inside a namespace declaration. The AIX xlC compiler does this, but allows us to redeclare the namespace inside the extern C block. * glib/glibmm/property.h: Use the new #ifdef GLIBMM_MUST_REDECLARE_NAMESPACES_INSIDE_EXTERNC and redeclare the namespace when necessary. * examples/thread/dispatcher.cc, dispatcher2.cc: Use sigc::bind<1> instead of just sigc::bind<> because the AIX xlC compiler needs the extra hint. However, the linker then fails, so the use of sigc::bind is ifdefed out for _AIX. See the comments in the code
* Remove unused parameter names to fix building with -Werror.Daniel Elstner2004-06-131-1/+1
| | | | | * examples/thread/dispatcher*.cc (main): Remove unused parameter names to fix building with -Werror.
* documentation fixes and corrections in the comments reflecting the shiftMartin Schulze2004-02-131-3/+2
| | | | | | | | | 2004-02-13 Martin Schulze <teebaum@cvs.gnome.org> * documentation fixes and corrections in the comments reflecting the shift to libsigc++ 2. * make all source files in example thread use libsigc++ 2 instead of libsigc++ 1.2.
* glibmm now uses libsigc++ 2 instead of libsigc++ 1.2. See bug #125061 forMurray Cumming2004-02-101-8/+8
| | | | | | | 2004-02-10 Murray Cumming <murrayc@usa.net> * glibmm now uses libsigc++ 2 instead of libsigc++ 1.2. See bug #125061 for more details. We must update CHANGES later.
* minor example code cleanupMurray Cumming2003-10-181-4/+7
|
* fixed to cast out all gktmm code, now they only need glimm. AddedJ. Abelardo Gutierrez2003-10-171-87/+62
| | | | | | | | | | 2003-10-02 J. Abelardo Gutierrez <jabelardo@cantv.net> * examples/threads/dispatcher.cc examples/threads/dispatcher2.cc: fixed to cast out all gktmm code, now they only need glimm. * configure.in: Added examples/threads because they don't use gtkmm anymore. Now all examples/threads compiles and run just fine.
* Initial revisionMurray Cumming2003-01-071-0/+254