Commit Graph

598 Commits

Author SHA1 Message Date
Stjepan Rajko
df183087b5 moving thread_safe_signals to new directory structure
[SVN r6987]
2007-06-12 05:11:57 +00:00
Frank Mori Hess
eaf9155b73 Updated thread_safe_signals FAQ wrt using with Qt.
[SVN r4498]
2007-06-08 17:31:57 +00:00
Frank Mori Hess
7058019227 Attempt to suppress unused variable warnings on
MSVC 7.1



[SVN r4497]
2007-06-08 13:44:11 +00:00
Frank Mori Hess
c82c37fea7 Fix for some unused parameter warnings, from
David Matz <david.matz@spatialview.com>


[SVN r4492]
2007-06-07 20:27:59 +00:00
Frank Mori Hess
871eb30f0d Fix for compilation error under MSVC 7.1
[SVN r4491]
2007-06-07 20:23:01 +00:00
Frank Mori Hess
2d0b5ba0cf Patch from "Stjepan Rajko" <stipe@asu.edu> that fixes some
compile warnings and a compile error under MSVC.


[SVN r3794]
2007-03-18 23:12:00 +00:00
Frank Mori Hess
436c0aa818 We can't explicitly track signals, except in the normal way with
shared_ptr.


[SVN r3777]
2007-03-13 17:38:37 +00:00
Frank Mori Hess
8d85e04b85 Fixed compilation errors when signals/slot.hpp is included by
itself.


[SVN r3776]
2007-03-13 17:22:08 +00:00
Frank Mori Hess
b25c8332e1 Fixed some confusion over ConnectionBody template parameter.
[SVN r3775]
2007-03-09 14:27:22 +00:00
Frank Mori Hess
f441823a89 Declare null_deleter as extern inline.
[SVN r3773]
2007-03-07 16:29:35 +00:00
Frank Mori Hess
9af73230c1 Removed obsolete header track.hpp
[SVN r3772]
2007-03-07 14:42:14 +00:00
Frank Mori Hess
4616b2392b Updated documentation.
[SVN r3771]
2007-03-06 21:51:55 +00:00
Frank Mori Hess
c41ae098e5 Added some missing BOOST_ABI_PREFIX/BOOST_ABI_SUFFIX
[SVN r3768]
2007-03-06 18:17:31 +00:00
Frank Mori Hess
02af416ff3 Added use of BOOST_STATIC_CONSTANT.
[SVN r3767]
2007-03-06 16:59:33 +00:00
Frank Mori Hess
33ee0681b3 Added shared_connection_block::blocking() query.
[SVN r3766]
2007-03-06 16:58:30 +00:00
Frank Mori Hess
e7382cd7c0 Removed overload of slot::track() that takes a signal reference,
since signals cannot be tracked in general (except in the usual way
all other objects can be tracked.


[SVN r3764]
2007-03-05 21:08:38 +00:00
Frank Mori Hess
e10508c674 Copied from signals/doc.
[SVN r3763]
2007-03-05 19:55:48 +00:00
Frank Mori Hess
59b4303469 Moved docs from libs/signals/doc. Updated to reflect some of the
more recent changes.


[SVN r3762]
2007-03-05 19:54:28 +00:00
Frank Mori Hess
5c96f547cd Added shared_connection_block::block() to allow user to
re-acquire block without creating a new shared_connection_block
object.


[SVN r3761]
2007-03-05 15:34:36 +00:00
Frank Mori Hess
011fdb87b5 Throw more specific "expired_slot" exception, derived from bad_weak_ptr
when slot is called with an expired tracked object.


[SVN r3760]
2007-03-05 15:10:55 +00:00
Frank Mori Hess
0ac91083af Restored explicit slot-to-slot tracking, since implicit version
only detects slot expiration on invocation.


[SVN r3759]
2007-03-05 14:52:46 +00:00
Frank Mori Hess
dd5e39db65 Test explicit slot-to-slot tracking.
[SVN r3758]
2007-03-05 14:51:26 +00:00
Frank Mori Hess
84dd05468f Made slots throw bad_weak_ptr when called with expired tracked
objects.  Combiners now have to catch bad_weak_ptr exceptions
thrown on slot iterator dereference.  Tracking works automatically
now for slots that call other slots.


[SVN r3756]
2007-03-02 22:04:47 +00:00
Frank Mori Hess
95c9712920 Added const overload of slot::operator()()
[SVN r3755]
2007-03-02 19:34:30 +00:00
Frank Mori Hess
61a18d5ac0 Got rid of signalslib::connection::block() and unblock() and replaced
them with exception-safe signalslib::shared_connection_block() class.
The new way is also more useable in a multi-threaded context, since
it prevents one thread from unexpectedly unblocking a
connection that another thread wants blocked.


[SVN r3754]
2007-03-02 16:00:39 +00:00
Frank Mori Hess
b0be180326 Tweaked constant-time garbage collection to clean up long contiguous
blocks of dangling connections in one pass.


[SVN r3753]
2007-03-01 19:06:09 +00:00
Frank Mori Hess
3acddc8716 Fixed some problems with slot ordering due to my misunderstanding
of how std::map::insert() handles the case of an already existing
key.


[SVN r3752]
2007-03-01 18:57:35 +00:00
Frank Mori Hess
66f76f5839 Restored per-slot locking, due to unresolvable failures in deletion_test.cpp.
Restored ThreadingModel parameter due to popular demand, but made default
"signals::auto_threaded" which uses the lightweight_mutex.  Removed
obsolete trackable.hpp.


[SVN r3751]
2007-03-01 15:57:25 +00:00
Frank Mori Hess
907cf1e513 Added little benchmark program
[SVN r3750]
2007-02-28 20:49:36 +00:00
Frank Mori Hess
3d2cd4ca2a Got rid of per-slot mutexes and ThreadingModel template parameter.
Use boost/detail/lightweight_mutex.hpp for the mutex now.  Still
need to optimize locking so it doesn't lock the mutex once for
every slot during invocation.


[SVN r3749]
2007-02-28 20:48:30 +00:00
Frank Mori Hess
fc5da3c9af Altered tests to account for changes from signals to thread_safe_signals.
[SVN r3748]
2007-02-28 19:44:09 +00:00
Frank Mori Hess
fcb6e2e506 Fixed signal::disconnect() with a slot function argument, which
was broken by recent changes to slot class.


[SVN r3747]
2007-02-28 19:30:18 +00:00
Frank Mori Hess
e6dd4d2c44 Added test programs from boost/libs/signals/test
[SVN r3746]
2007-02-28 19:16:04 +00:00
Frank Mori Hess
9f7d76cdb0 Added missing typename to fix compile under gcc 4.1.2
[SVN r3745]
2007-02-28 17:08:48 +00:00
Frank Mori Hess
724e89c855 My problems with bind syntactic sugar appear to be a compiler bug after
all.  The errors go away with gcc 4.1.2


[SVN r3744]
2007-02-28 17:08:12 +00:00
Frank Mori Hess
3f98854422 Added typedefs to slot class for argN_type, and added "arity" constant.
[SVN r3743]
2007-02-28 17:06:53 +00:00
Frank Mori Hess
877777b79f Fixed tracking of signals as slots, and added a test for same.
[SVN r3742]
2007-02-28 16:19:41 +00:00
Frank Mori Hess
bef2bfc4fb Added some templated copy constructors to slot class, to prevent
loss of tracking on copy construction.


[SVN r3741]
2007-02-28 15:54:22 +00:00
Frank Mori Hess
a24b8410bf Make tracking of double argument less meaningless by passing reference
instead of copy.


[SVN r3739]
2007-02-27 22:24:33 +00:00
Frank Mori Hess
a7d581107b Added Signature template parameter to slot class, so that an
operator() could be added.  Bind can be used to bind together
slots with different signatures now.  Added some syntactic
sugar to slot constructors, so a bind() call is inserted automatically
for the constructors that take more than one argument.
All tracking for automatic connection
management is now done through slot::track().
Added track_test.cpp test program, which tests some of the new
functionality.


[SVN r3738]
2007-02-27 21:19:25 +00:00
Frank Mori Hess
54c4fe3f19 Handle reference-wrapped values gracefully for the sake of the
2 parameter version of track().


[SVN r3734]
2007-02-22 20:47:20 +00:00
Frank Mori Hess
d68126b028 Changed order of parameters in signals::track().
[SVN r3733]
2007-02-22 20:23:48 +00:00
Frank Mori Hess
6d1e6bdc0f tracked object returned by single argument track() should at least
support conversion back into a shared_ptr.


[SVN r3732]
2007-02-22 19:51:20 +00:00
Frank Mori Hess
ca88cf698c Forget about trying to support implicit conversions for the sake of
easy binding.  The user can use the two argument form of track if
they need to.


[SVN r3731]
2007-02-22 18:54:58 +00:00
Frank Mori Hess
0153eec102 Added support for 2-argument form of signalslib::track(), which allows
value and shared_ptr to be specified independantly.


[SVN r3730]
2007-02-22 16:57:12 +00:00
Frank Mori Hess
e3fbf95743 Made add_tracked() a public member of the slot class, so arbitrary
objects can be added for the purpose of automatic connection management.


[SVN r3728]
2007-02-21 20:28:14 +00:00
Frank Mori Hess
61dfcafcb6 It's silly to make track() support reference-wrapped arguments.
[SVN r3726]
2007-02-21 15:15:23 +00:00
Frank Mori Hess
57700dba13 Fixed a race that made it possible for two slot iterators to fail a test
for equality after one was copy constructed or assigned from the other.


[SVN r3721]
2007-02-20 13:32:23 +00:00
Frank Mori Hess
f14424fc8d Added implicit conversion to reference type to boost::tracked
[SVN r3720]
2007-02-20 01:19:25 +00:00
Frank Mori Hess
79107457d5 We still need to grab the tracked objects in the slot iterator
before running the slot.


[SVN r3717]
2007-02-19 03:48:35 +00:00