Commit Graph

299 Commits

Author SHA1 Message Date
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