Frank Mori Hess
60a07d0426
Added me as author.
...
[SVN r43552]
2008-03-10 19:46:29 +00:00
Frank Mori Hess
59c7b6c218
Fixed bogus assertion failure, reported by Steve Hand.
...
[SVN r43432]
2008-02-28 19:59:40 +00:00
Frank Mori Hess
411c9158ed
A signal used as a slot should throw an expired_slot exception,
...
instead of a bad_weak_ptr.
[SVN r43427]
2008-02-27 20:05:27 +00:00
Frank Mori Hess
83b7bd60c7
Fixed include guard in auto_threaded.hpp from conflicting with
...
multi_threaded.hpp.
[SVN r43015]
2008-01-29 20:49:58 +00:00
Frank Mori Hess
087da776e9
Added support for tracking signal objects. Moved signal_base out
...
of detail namespace, since it is used as an argument in a public
method now. Fixed track_test.cpp to use new signal tracking
method.
[SVN r42446]
2008-01-03 22:10:00 +00:00
Frank Mori Hess
18c90fedc1
Koenig lookup isn't working.
...
[SVN r42392]
2007-12-31 18:11:27 +00:00
Frank Mori Hess
df52509ee4
Use koenig lookup to find swap() function.
...
[SVN r42232]
2007-12-21 18:55:35 +00:00
Frank Mori Hess
6df8e11675
Removed more title 17 comments. Use same email address for me everywhere.
...
[SVN r39559]
2007-09-26 20:35:07 +00:00
Frank Mori Hess
48e789142b
Removed US gov copyright related notices, since this no longer
...
involves just US gov employees.
[SVN r39558]
2007-09-26 20:30:35 +00:00
Frank Mori Hess
7e8fee8ddb
Fixed minor typo in comment.
...
[SVN r39496]
2007-09-24 02:11:27 +00:00
Frank Mori Hess
3c64b1b7e5
Moved boost::signalslib::detail::slot_base to boost::signalslib::slot_base,
...
since it has been exposed in the API by one of the slot::track
methods.
[SVN r39493]
2007-09-24 00:18:48 +00:00
Frank Mori Hess
c485776c4c
Pruned some dead debugging code.
...
[SVN r39456]
2007-09-21 19:07:18 +00:00
Frank Mori Hess
f7329a8298
Removed some reminders of obsolete EPG namespace.
...
[SVN r39455]
2007-09-21 19:06:07 +00:00
Frank Mori Hess
0da67d9a8e
Indent with spaces instead of tabs, as specified by boost coding guidelines.
...
[SVN r39454]
2007-09-21 18:59:41 +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
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
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
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
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
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
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
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
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
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
Frank Mori Hess
8e51578eff
Clean-ups made possible by reduced scope of locking in slot iterator.
...
[SVN r3715]
2007-02-18 22:47:19 +00:00
Frank Mori Hess
f8c19c9fa6
reset lock_iter too when lock is deleted.
...
[SVN r3714]
2007-02-18 18:16:57 +00:00
Frank Mori Hess
9accf820fd
Drop slot lock right before slot is actually executed.
...
[SVN r3712]
2007-02-18 17:41:48 +00:00
Frank Mori Hess
428e31bcae
Fix set_combiner, which I broke. Only copy connection list in set_combiner
...
if needed.
[SVN r3709]
2007-02-18 00:13:37 +00:00
Frank Mori Hess
d698187147
Don't need to call lockNextCallable() in constructor at all (thanks
...
Timmo).
[SVN r3708]
2007-02-17 23:01:43 +00:00
Frank Mori Hess
7143a7f202
Reduced number of shared_pointers that have to be
...
created during invocation by one. Made lock_memory_pool a little more
likely to catch misuse. Moved some lockNextCallable() calls into
slot_iterator constructor.
I think I've found all the straight-forward optimizations now.
[SVN r3707]
2007-02-17 22:55:13 +00:00
Frank Mori Hess
9ae0db471a
Make sure lock_pool destructs after lock.
...
[SVN r3706]
2007-02-17 17:21:52 +00:00
Frank Mori Hess
0c2497c69e
Implemented swap for connections.
...
[SVN r3705]
2007-02-17 16:03:32 +00:00
Frank Mori Hess
68df3e9c37
Optimized allocation of scoped_locks in slot_call_iterator.
...
[SVN r3704]
2007-02-17 15:48:45 +00:00
Frank Mori Hess
1784478549
Added support for turning on and off thread safety through
...
ThreadingModel template parameter. For thread-safe signals,
the file thread_safe_signals/multi_threaded.hpp must be
included in addition to the main header file.
[SVN r3703]
2007-02-17 03:12:22 +00:00
Frank Mori Hess
31e3582021
Got rid of stupid quick_ptr optimization attempt, as the lack of
...
thread-safety on destruction is lethal.
[SVN r3702]
2007-02-16 23:29:45 +00:00
Frank Mori Hess
33b678a25d
Added constant-time garbage collection.
...
[SVN r3701]
2007-02-16 22:45:41 +00:00
Frank Mori Hess
0d03885f12
More performance optimizations.
...
[SVN r3700]
2007-02-16 21:35:09 +00:00
Frank Mori Hess
1f6057171c
Performance optimization: use scoped_ptr instead of shared_ptr to hold
...
lock in slot_call_iterator. Reduces per-slot invocation overhead
by about 50%.
[SVN r3699]
2007-02-16 15:20:12 +00:00
Frank Mori Hess
6318771524
A little optimization.
...
[SVN r3694]
2007-02-16 02:05:12 +00:00
Frank Mori Hess
d5b9d38924
Fixed some lock contention that was preventing signal invocation from
...
running concurrently.
[SVN r3693]
2007-02-15 21:42:44 +00:00
Frank Mori Hess
bfed28f8fb
Added backwards compatibility for deprecated boost::signals::trackable
...
[SVN r3692]
2007-02-15 19:26:36 +00:00
Frank Mori Hess
3c7c3eb3d7
Fixed possibility of deadlock in connection cleanup.
...
[SVN r3689]
2007-02-15 04:31:01 +00:00
Frank Mori Hess
93be68e47f
Fixed automatic tracking of pointers to signals. Passes all tests
...
now (tweaked to use new automatic connection management), except
for a deadlock that occasionally appears with random_signal_system.cpp.
[SVN r3688]
2007-02-15 04:11:47 +00:00
Frank Mori Hess
482bb28b9d
Fixed deadlocks observed in random_signal_system.cpp. Made
...
disconnect-by-slot not assume there is only one matching slot.
[SVN r3687]
2007-02-14 21:24:47 +00:00
Frank Mori Hess
f00f13ae54
Fixed some problems when running (modified version of) trackable_test.cpp
...
[SVN r3686]
2007-02-14 19:23:20 +00:00
Frank Mori Hess
f98dc803ae
Added support for automatic tracking of signals used as slots.
...
Passes signal_n_test.cpp now.
[SVN r3682]
2007-02-13 20:16:41 +00:00
Frank Mori Hess
a3c518cb0c
Added support for connecting to reference_wrapper and signals as slots.
...
[SVN r3681]
2007-02-13 16:17:28 +00:00
Frank Mori Hess
c80f10da46
Added const version of signal invocation operator. Got rid of
...
noncopyable for scoped_connection.
[SVN r3680]
2007-02-12 22:31:15 +00:00
Frank Mori Hess
2ad5d75370
Passes random_system_signal.cpp test now.
...
[SVN r3679]
2007-02-12 21:58:05 +00:00
Frank Mori Hess
609f01ff9a
Fixed double-erase of element in grouped_list map. Don't assume
...
signal parameter types are default constructible. Added support
for connection comparison operators.
[SVN r3678]
2007-02-12 21:48:00 +00:00
Frank Mori Hess
6d1e3e854e
Fixed some bugs in new slot ordering.
...
[SVN r3677]
2007-02-12 17:14:39 +00:00
Frank Mori Hess
c1b82c7644
Optimized insertion of grouped slots so it doesn't take O(n) time
...
anymore.
[SVN r3676]
2007-02-12 16:43:12 +00:00
Frank Mori Hess
6e9a154a75
Fixed some memory problems with scoped_locks destructing after their
...
mutexes.
[SVN r3675]
2007-02-12 02:42:32 +00:00
Frank Mori Hess
2f64b48a18
Added support for signal::disconnect() by slot, and connection
...
blocking. Passes deletion_test.cpp now.
[SVN r3674]
2007-02-12 02:35:21 +00:00
Frank Mori Hess
a9599a8fce
Fixed a bunch of implicit typename warnings seen while compiling
...
dead_slot_test.cpp.
[SVN r3673]
2007-02-12 00:42:01 +00:00
Frank Mori Hess
dfef6e53e3
Use optional instead of shared_ptr in group_key
...
[SVN r3670]
2007-02-11 15:51:16 +00:00
Frank Mori Hess
bf158b10ef
Removed dead code.
...
[SVN r3669]
2007-02-11 14:20:32 +00:00
Frank Mori Hess
1d397e32f4
Moved into namespace boost, and provided compatibility for
...
boost::signals namespace.
[SVN r3668]
2007-02-11 14:15:35 +00:00
Frank Mori Hess
d9ab3613b0
Modified EPG::signalN classes to conform to the portable boost signals
...
interface.
[SVN r3666]
2007-02-11 04:53:53 +00:00
Frank Mori Hess
531e2055bb
Got rid of useless Signature template parameter on ConnectionBody.
...
Moved signalslib::detail::SignalN classes up two namespaces, in
preparation for turning them into the portable boost::signalN
classes.
[SVN r3665]
2007-02-11 04:02:00 +00:00
Frank Mori Hess
898c60fa5f
Simplified and fixed slot group support.
...
[SVN r3664]
2007-02-11 02:17:21 +00:00
Frank Mori Hess
b6d93fa1a1
forgot to add new file with last commit.
...
[SVN r3662]
2007-02-09 20:54:39 +00:00
Frank Mori Hess
88ca7a1135
Added support for slot forwarding. Added support for
...
SlotFunction template parameter. Added some missing member
functions to signal. Fixed signal::num_slots()
and empty() to ignore disconnected slots. Made cleanup in
connect() correctly check for automatically disconnected slots.
[SVN r3661]
2007-02-09 20:54:06 +00:00
Frank Mori Hess
6851a9c38c
Fixed some problems with ordering of slots within groups. Added
...
group compare parameter to constructor. Filled in some missing
typedefs and member functions.
[SVN r3660]
2007-02-09 16:52:32 +00:00
Frank Mori Hess
2e75724295
Added support for slot groups.
...
[SVN r3658]
2007-02-08 20:56:21 +00:00
Frank Mori Hess
377edeb681
Added support for combiners.
...
[SVN r3657]
2007-02-08 16:39:56 +00:00
Frank Mori Hess
72de1f009e
Don't block on slot mutexes while cleaning up connection list. Also
...
prevented connection list cleanup in slot invocation from stomping
on a connection list in use by another thread.
[SVN r3656]
2007-02-08 13:40:21 +00:00
Frank Mori Hess
82dc145f4e
A slot can now disconnect it self without deadlock.
...
I reduced lock contention. Now, disconnect()
can complete while the signal is being
invoked (though not while the slot in question
is actively running in any
other thread). The signal may be invoked concurrently, but any
particular slot will not be run concurrently. connect() may complete
while the signal is being invoked.
[SVN r3654]
2007-02-07 20:34:14 +00:00
Frank Mori Hess
3c15e2eaaf
Cleaned up remaining bits from old disconnect callback.
...
Added automatic connection management.
Fixed possibility of unintended throws of bad_weak_ptr.
[SVN r3648]
2007-02-06 16:51:27 +00:00
Frank Mori Hess
c7313e2110
Removed cleanup of connections in disconnect(), moved it to connect(), in
...
anticipation of automatic connection management.
[SVN r3645]
2007-02-05 16:03:00 +00:00
Frank Mori Hess
ddca1126cb
Added new files which are the beginnings of a thread-safe implementation
...
of boost.signals
[SVN r3638]
2007-02-02 20:07:57 +00:00