<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Introducing TurboSignals</title>
	<atom:link href="http://jacksondunstan.com/articles/585/feed" rel="self" type="application/rss+xml" />
	<link>http://jacksondunstan.com/articles/585</link>
	<description>Mastering AS3</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:02:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Data Binding with Signals - Mrinal Wadhwa on Rich Internet Applications</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-646</link>
		<dc:creator>Data Binding with Signals - Mrinal Wadhwa on Rich Internet Applications</dc:creator>
		<pubDate>Sat, 29 May 2010 04:01:25 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-646</guid>
		<description>[...] a ChangeSignal whenever that property changes. The ChangeSignal implementation is inspired by Jackson Dunstan&#8217;s TurboSignals instead of Rob Penner&#8217;s more flexible AS3Signals library because using a specialized signal [...]</description>
		<content:encoded><![CDATA[<p>[...] a ChangeSignal whenever that property changes. The ChangeSignal implementation is inspired by Jackson Dunstan&#8217;s TurboSignals instead of Rob Penner&#8217;s more flexible AS3Signals library because using a specialized signal [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-605</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Fri, 26 Mar 2010 17:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-605</guid>
		<description>Sure. Given these simple slots:

&lt;pre lang=&quot;actionscript3&quot;&gt;
interface ISimpleSlot
{
	function callMe(): void;
}
class SimpleSlot implements ISimpleSlot
{
	public function callMe(): void{}
}
&lt;/pre&gt;

I wrote this simple test:

&lt;pre lang=&quot;actionscript3&quot;&gt;
const REPS:int = 10000000;
var i:int;
var beforeTime:int;
var afterTime:int;
var slot:ISimpleSlot = new SimpleSlot();
var callbackName:String = &quot;callMe&quot;;

beforeTime = getTimer();
for (i = 0; i &lt; REPS; ++i)
{
	slot.callMe();
}
afterTime = getTimer();
log(&quot;direct call: &quot; + (afterTime-beforeTime));

beforeTime = getTimer();
for (i = 0; i &lt; REPS; ++i)
{
	slot[callbackName]();
}
afterTime = getTimer();
log(&quot;call through function name (no cast): &quot; + (afterTime-beforeTime));

beforeTime = getTimer();
for (i = 0; i &lt; REPS; ++i)
{
	(slot[callbackName] as Function)();
}
afterTime = getTimer();
log(&quot;call through function name (cast): &quot; + (afterTime-beforeTime));
&lt;/pre&gt;

And got these results:

&lt;table&gt;
&lt;tr&gt;
&lt;th&gt;Environment&lt;/th&gt;
&lt;th&gt;Direct Call&lt;/th&gt;
&lt;th&gt;Call Through Func Name (no cast)&lt;/th&gt;
&lt;th&gt;Call Through Func Name (cast)&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3.0 Ghz Intel Core 2 Duo, Windows XP&lt;/td&gt;
&lt;td&gt;68&lt;/td&gt;
&lt;td&gt;2675&lt;/td&gt;
&lt;td&gt;2860&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

So it&#039;s about 40x slower than a direct call. That&#039;s a bit much of a compromise for &lt;tt&gt;TurboSignals&lt;/tt&gt;. :)</description>
		<content:encoded><![CDATA[<p>Sure. Given these simple slots:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">interface ISimpleSlot
<span style="color: #000000;">&#123;</span>
    <span style="color: #339966; font-weight: bold;">function</span> callMe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span>;
<span style="color: #000000;">&#125;</span>
<span style="color: #9900cc; font-weight: bold;">class</span> SimpleSlot implements ISimpleSlot
<span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> callMe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>I wrote this simple test:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">const</span> REPS<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">10000000</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> beforeTime<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> afterTime<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> slot<span style="color: #000000; font-weight: bold;">:</span>ISimpleSlot = <span style="color: #0033ff; font-weight: bold;">new</span> SimpleSlot<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> callbackName<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">&quot;callMe&quot;</span>;
&nbsp;
beforeTime = <span style="color: #004993;">getTimer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span>; i <span style="color: #000000; font-weight: bold;">&lt;</span> REPS; <span style="color: #000000; font-weight: bold;">++</span>i<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    slot.callMe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
afterTime = <span style="color: #004993;">getTimer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">log</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;direct call: &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>afterTime<span style="color: #000000; font-weight: bold;">-</span>beforeTime<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
beforeTime = <span style="color: #004993;">getTimer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span>; i <span style="color: #000000; font-weight: bold;">&lt;</span> REPS; <span style="color: #000000; font-weight: bold;">++</span>i<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    slot<span style="color: #000000;">&#91;</span>callbackName<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
afterTime = <span style="color: #004993;">getTimer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">log</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;call through function name (no cast): &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>afterTime<span style="color: #000000; font-weight: bold;">-</span>beforeTime<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
beforeTime = <span style="color: #004993;">getTimer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = <span style="color: #000000; font-weight:bold;">0</span>; i <span style="color: #000000; font-weight: bold;">&lt;</span> REPS; <span style="color: #000000; font-weight: bold;">++</span>i<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #000000;">&#40;</span>slot<span style="color: #000000;">&#91;</span>callbackName<span style="color: #000000;">&#93;</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">Function</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
afterTime = <span style="color: #004993;">getTimer</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">log</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;call through function name (cast): &quot;</span> <span style="color: #000000; font-weight: bold;">+</span> <span style="color: #000000;">&#40;</span>afterTime<span style="color: #000000; font-weight: bold;">-</span>beforeTime<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>And got these results:</p>
<table>
<tr>
<th>Environment</th>
<th>Direct Call</th>
<th>Call Through Func Name (no cast)</th>
<th>Call Through Func Name (cast)</th>
</tr>
<tr>
<td>3.0 Ghz Intel Core 2 Duo, Windows XP</td>
<td>68</td>
<td>2675</td>
<td>2860</td>
</tr>
</table>
<p>So it&#8217;s about 40x slower than a direct call. That&#8217;s a bit much of a compromise for <tt>TurboSignals</tt>. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Winx Alex</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-604</link>
		<dc:creator>Winx Alex</dc:creator>
		<pubDate>Fri, 26 Mar 2010 00:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-604</guid>
		<description>Could you make test. 
object[&quot;nameOfTheFunction&quot;])
vs
object.nameOfTheFunction().
so we see what is quite slow. Everything is compromise. Little bit slower but cleaner. Except in atom accelerator :)</description>
		<content:encoded><![CDATA[<p>Could you make test.<br />
object["nameOfTheFunction"])<br />
vs<br />
object.nameOfTheFunction().<br />
so we see what is quite slow. Everything is compromise. Little bit slower but cleaner. Except in atom accelerator :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-603</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Thu, 25 Mar 2010 02:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-603</guid>
		<description>It would be fantastic if this would result in a dramatic speedup similar to the speedup you get in &lt;tt&gt;TurboSignals&lt;/tt&gt;. This would relieve the programmer of the need to create &lt;tt&gt;Slot&lt;/tt&gt; derivatives and allow them to name callback functions however they wish, both downsides of using &lt;tt&gt;TurboSignals&lt;/tt&gt;. However, I believe that there are two reasons why this would result in code that runs at the same speed or possibly even slower than &lt;tt&gt;as3signals&lt;/tt&gt; does right now. Firstly, the dynamic access (&lt;tt&gt;object[&quot;nameOfTheFunction&quot;]&lt;/tt&gt;) is quite slow. Secondly, what you get back is indeed just a &lt;tt&gt;Function&lt;/tt&gt; variable, so calling it (&lt;tt&gt;.apply(object,valueObjects)&lt;/tt&gt;) would be as slow as the original (&lt;tt&gt;listener.apply(null, valueObjects&lt;/tt&gt;).

What makes &lt;tt&gt;TurboSignals&lt;/tt&gt; fast is the strong guarantee that the compiler and JIT are afforded by using a typed object: the &lt;tt&gt;Slot&lt;/tt&gt; class. Removing the typing causes the slowdowns you see in both &lt;tt&gt;as3signals&lt;/tt&gt; and &lt;tt&gt;EventDispatcher&lt;/tt&gt;, although the latter has many more problems than just weak typing.</description>
		<content:encoded><![CDATA[<p>It would be fantastic if this would result in a dramatic speedup similar to the speedup you get in <tt>TurboSignals</tt>. This would relieve the programmer of the need to create <tt>Slot</tt> derivatives and allow them to name callback functions however they wish, both downsides of using <tt>TurboSignals</tt>. However, I believe that there are two reasons why this would result in code that runs at the same speed or possibly even slower than <tt>as3signals</tt> does right now. Firstly, the dynamic access (<tt>object["nameOfTheFunction"]</tt>) is quite slow. Secondly, what you get back is indeed just a <tt>Function</tt> variable, so calling it (<tt>.apply(object,valueObjects)</tt>) would be as slow as the original (<tt>listener.apply(null, valueObjects</tt>).</p>
<p>What makes <tt>TurboSignals</tt> fast is the strong guarantee that the compiler and JIT are afforded by using a typed object: the <tt>Slot</tt> class. Removing the typing causes the slowdowns you see in both <tt>as3signals</tt> and <tt>EventDispatcher</tt>, although the latter has many more problems than just weak typing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Winx Alex</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-602</link>
		<dc:creator>Winx Alex</dc:creator>
		<pubDate>Thu, 25 Mar 2010 01:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-602</guid>
		<description>For all this we can conclude that events run faster if they are called on object(not true pointer or thru EventDispatcher) but object.function(args). 
So you need to make few changes in original Robert Panner code. Let took Signal.as and
- &quot;add&quot; function should took add(object,&quot;nameOftheFunction&quot;)
-listeners array would take now object-&quot;nameOftheFunction&quot; pair instead of pointer of the function
-&quot;dispatch&quot; function 
in instead of listener.apply(null, valueObjects);
should make object[&quot;nameOftheFunction&quot;](valueObjects) or something like that maybe with object[&quot;nameOftheFunction&quot;].apply(object,valueObjects).....</description>
		<content:encoded><![CDATA[<p>For all this we can conclude that events run faster if they are called on object(not true pointer or thru EventDispatcher) but object.function(args).<br />
So you need to make few changes in original Robert Panner code. Let took Signal.as and<br />
- &#8220;add&#8221; function should took add(object,&#8221;nameOftheFunction&#8221;)<br />
-listeners array would take now object-&#8221;nameOftheFunction&#8221; pair instead of pointer of the function<br />
-&#8221;dispatch&#8221; function<br />
in instead of listener.apply(null, valueObjects);<br />
should make object["nameOftheFunction"](valueObjects) or something like that maybe with object["nameOftheFunction"].apply(object,valueObjects)&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Things I learnt recently &#171; Tahir Ahmed&#39;s thoughts</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-557</link>
		<dc:creator>Things I learnt recently &#171; Tahir Ahmed&#39;s thoughts</dc:creator>
		<pubDate>Tue, 09 Mar 2010 08:39:02 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-557</guid>
		<description>[...] can be (and has been) said about as3signals, but I will keep it for you to explore. Oh and btw, an enhancement to as3signals is going on as well which, to be very honest, is going over my [...]</description>
		<content:encoded><![CDATA[<p>[...] can be (and has been) said about as3signals, but I will keep it for you to explore. Oh and btw, an enhancement to as3signals is going on as well which, to be very honest, is going over my [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-538</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Fri, 19 Feb 2010 01:15:17 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-538</guid>
		<description>I like your logic a lot and I can totally see this point of view. It seems that in this situation, as you point out, we must choose where to optimize. A case like you show above could very well happen and the current penalty in TurboSignals would be slower &lt;tt&gt;addSlot&lt;/tt&gt;, &lt;tt&gt;removeSlot&lt;/tt&gt;, and &lt;tt&gt;removeAllSlots&lt;/tt&gt; calls from then on. This is indeed a steep penalty, so avoiding it as you have optimizes to remove this penalty. But in the process of optimizing that way you have, as you again have pointed out, made recursive dispatching slower.

So the question is this: should we optimize for recursive dispatching (TurboSignals&#039; current way) or for thrown errors (the way the signal class you linked works)? To me the matter comes down to the legitimacy of the two uses cases. In my view, errors are bad but recursive dispatching is a valid feature of TurboSignals. I prefer not to punish the valid uses of TurboSignals for the sake of the invalid uses. You can, of course, do whatever you&#039;d like to in your own signal class. :)</description>
		<content:encoded><![CDATA[<p>I like your logic a lot and I can totally see this point of view. It seems that in this situation, as you point out, we must choose where to optimize. A case like you show above could very well happen and the current penalty in TurboSignals would be slower <tt>addSlot</tt>, <tt>removeSlot</tt>, and <tt>removeAllSlots</tt> calls from then on. This is indeed a steep penalty, so avoiding it as you have optimizes to remove this penalty. But in the process of optimizing that way you have, as you again have pointed out, made recursive dispatching slower.</p>
<p>So the question is this: should we optimize for recursive dispatching (TurboSignals&#8217; current way) or for thrown errors (the way the signal class you linked works)? To me the matter comes down to the legitimacy of the two uses cases. In my view, errors are bad but recursive dispatching is a valid feature of TurboSignals. I prefer not to punish the valid uses of TurboSignals for the sake of the invalid uses. You can, of course, do whatever you&#8217;d like to in your own signal class. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: whitered</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-537</link>
		<dc:creator>whitered</dc:creator>
		<pubDate>Fri, 19 Feb 2010 00:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-537</guid>
		<description>Yes, this is true that you should expect uncaught exceptions to do bad things. But I think that you should not expect bad things from exception that was caught and handled. 

Code like that can delude a developer:

&lt;pre lang=&quot;actionscript3&quot;&gt;
try { 
  signal.dispatch(wrongValue); 
} catch(e:Error) { 
  ...
  // now we think we have fixed everything but actually we have got a slow signal 
}
&lt;/pre&gt;

On the other hand this implementation will result in slower dispatching but do it clearly and in very rare situations (recursive dispatchings) http://github.com/whitered/Kote/blob/master/src/ru/whitered/kote/Signal.as

Not but what to wrap the slot call in a try/catch block is the worst idea as I think.</description>
		<content:encoded><![CDATA[<p>Yes, this is true that you should expect uncaught exceptions to do bad things. But I think that you should not expect bad things from exception that was caught and handled. </p>
<p>Code like that can delude a developer:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">try</span> <span style="color: #000000;">&#123;</span> 
  signal.dispatch<span style="color: #000000;">&#40;</span>wrongValue<span style="color: #000000;">&#41;</span>; 
<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Error</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> 
  ...
  <span style="color: #009900;">// now we think we have fixed everything but actually we have got a slow signal </span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>On the other hand this implementation will result in slower dispatching but do it clearly and in very rare situations (recursive dispatchings) <a href="http://github.com/whitered/Kote/blob/master/src/ru/whitered/kote/Signal.as" rel="nofollow">http://github.com/whitered/Kote/blob/master/src/ru/whitered/kote/Signal.as</a></p>
<p>Not but what to wrap the slot call in a try/catch block is the worst idea as I think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-536</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Thu, 18 Feb 2010 18:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-536</guid>
		<description>Yes, it would lead to lots of slot list copying later on and it would also lead to the rest of the slots not being called. The former is a performance problem and the latter is a correctness problem. Unfortunately, the only way I know of to fix the correctness problem is to wrap the slot call in a &lt;tt&gt;try/catch&lt;/tt&gt; block. As I&#039;ve &lt;a href=&quot;/articles/377&quot; rel=&quot;nofollow&quot;&gt;shown&lt;/a&gt; &lt;a href=&quot;/articles/379&quot; rel=&quot;nofollow&quot;&gt;before&lt;/a&gt;, this would introduce a big performance problem itself.

Personally I think that you should expect uncaught exceptions to do bad things to your program. TurboSignals is but a drop in the ocean of code that isn&#039;t handling thrown errors. Luckily with TurboSignals you get off easy: the rest of your slots don&#039;t get called and it performs slower from then on, but at least it never crashes.

I&#039;d welcome anyone to reply here with comments on how TurboSignals should handle uncaught errors thrown by slots.</description>
		<content:encoded><![CDATA[<p>Yes, it would lead to lots of slot list copying later on and it would also lead to the rest of the slots not being called. The former is a performance problem and the latter is a correctness problem. Unfortunately, the only way I know of to fix the correctness problem is to wrap the slot call in a <tt>try/catch</tt> block. As I&#8217;ve <a href="/articles/377" rel="nofollow">shown</a> <a href="/articles/379" rel="nofollow">before</a>, this would introduce a big performance problem itself.</p>
<p>Personally I think that you should expect uncaught exceptions to do bad things to your program. TurboSignals is but a drop in the ocean of code that isn&#8217;t handling thrown errors. Luckily with TurboSignals you get off easy: the rest of your slots don&#8217;t get called and it performs slower from then on, but at least it never crashes.</p>
<p>I&#8217;d welcome anyone to reply here with comments on how TurboSignals should handle uncaught errors thrown by slots.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: whitered</title>
		<link>http://jacksondunstan.com/articles/585/comment-page-1#comment-534</link>
		<dc:creator>whitered</dc:creator>
		<pubDate>Thu, 18 Feb 2010 10:55:05 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=585#comment-534</guid>
		<description>This implementation has a hidden danger: signal become broken when a slot throw an error. In that case signal&#039;s __numDispatchesInProgress counter will always be greater than in should be so the signal will often clone its slots when it isn&#039;t necessary. 
I think redispatches happens rather rarely so I&#039;ve decided to keep things simple and to clone my callbacks in dispatch method on redispatches.</description>
		<content:encoded><![CDATA[<p>This implementation has a hidden danger: signal become broken when a slot throw an error. In that case signal&#8217;s __numDispatchesInProgress counter will always be greater than in should be so the signal will often clone its slots when it isn&#8217;t necessary.<br />
I think redispatches happens rather rarely so I&#8217;ve decided to keep things simple and to clone my callbacks in dispatch method on redispatches.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
