<?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: Lock Free Multithreading in Qt</title>
	<atom:link href="http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/feed/" rel="self" type="application/rss+xml" />
	<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/</link>
	<description>Your blog is probably better than mine.</description>
	<lastBuildDate>Sun, 05 Feb 2012 05:18:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Bob</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-148910</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Wed, 05 Oct 2011 18:17:55 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-148910</guid>
		<description>Thanks for the article, Dave!  Solved my problem.  I am using the Chilkat socket library for my app, but can&#039;t use the asynchronous socket calls because they aren&#039;t supported on Linux.  Wrapping things in a QThreat wrapper was the perfect answer!</description>
		<content:encoded><![CDATA[<p>Thanks for the article, Dave!  Solved my problem.  I am using the Chilkat socket library for my app, but can&#8217;t use the asynchronous socket calls because they aren&#8217;t supported on Linux.  Wrapping things in a QThreat wrapper was the perfect answer!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-140918</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 22 Jul 2011 14:12:36 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-140918</guid>
		<description>qtnewbie:

You could try using many small I/O operations (1-2 seconds) instead of one big one (4-5 minutes). You could also look into non-blocking I/O.

--Dave</description>
		<content:encoded><![CDATA[<p>qtnewbie:</p>
<p>You could try using many small I/O operations (1-2 seconds) instead of one big one (4-5 minutes). You could also look into non-blocking I/O.</p>
<p>&#8211;Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qtnewbie</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-140885</link>
		<dc:creator>qtnewbie</dc:creator>
		<pubDate>Fri, 22 Jul 2011 06:38:50 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-140885</guid>
		<description>Hi,

Thanks for the thread article,Iam using Q threads after reading this,I have 1 doubt regarding thread termination what I have to do to stop a thread if the thread is blocked(I have file I/O operation which takes around 4-5 minutes).I cannot start the event loop as the file read function is blocking the event loop in thread.Pls comment.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for the thread article,Iam using Q threads after reading this,I have 1 doubt regarding thread termination what I have to do to stop a thread if the thread is blocked(I have file I/O operation which takes around 4-5 minutes).I cannot start the event loop as the file read function is blocking the event loop in thread.Pls comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-113052</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Wed, 27 Oct 2010 16:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-113052</guid>
		<description>http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/
moveToThread(this) is deprecated</description>
		<content:encoded><![CDATA[<p><a href="http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/" rel="nofollow">http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/</a><br />
moveToThread(this) is deprecated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-103257</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sun, 20 Jun 2010 03:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-103257</guid>
		<description>Okay, it turns out that subclassing QThread is not actually necessary:

http://blog.exys.org/entries/2010/QThread_affinity.html

You don&#039;t have to write a run() method. You can just *have* a QThread in your class, and call start() on it. Then, call moveToThread(&amp;thread) rather than moveToThread(this).

Very interesting.</description>
		<content:encoded><![CDATA[<p>Okay, it turns out that subclassing QThread is not actually necessary:</p>
<p><a href="http://blog.exys.org/entries/2010/QThread_affinity.html" rel="nofollow">http://blog.exys.org/entries/2010/QThread_affinity.html</a></p>
<p>You don&#8217;t have to write a run() method. You can just *have* a QThread in your class, and call start() on it. Then, call moveToThread(&#038;thread) rather than moveToThread(this).</p>
<p>Very interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor Jetten</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-98827</link>
		<dc:creator>Victor Jetten</dc:creator>
		<pubDate>Sun, 21 Feb 2010 16:34:44 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-98827</guid>
		<description>it works now, I had commented out &quot;movetothread(this)&quot;. Sorry for polluting your blog! ;-)</description>
		<content:encoded><![CDATA[<p>it works now, I had commented out &#8220;movetothread(this)&#8221;. Sorry for polluting your blog! ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor Jetten</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-98826</link>
		<dc:creator>Victor Jetten</dc:creator>
		<pubDate>Sun, 21 Feb 2010 16:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-98826</guid>
		<description>sorry! I did not declare sowit under &quot;private slots:&quot; in the class, still getting the hang of this. However now that it runs it does not show every step in the counter, only the last one. I guess emit is not meant for passing values. I&#039;ll check what qtimer does</description>
		<content:encoded><![CDATA[<p>sorry! I did not declare sowit under &#8220;private slots:&#8221; in the class, still getting the hang of this. However now that it runs it does not show every step in the counter, only the last one. I guess emit is not meant for passing values. I&#8217;ll check what qtimer does</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-98825</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sun, 21 Feb 2010 16:14:29 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-98825</guid>
		<description>Oh, and a couple more things:

Is your method showit() declared as a &quot;slot&quot;, and not just &quot;public&quot;, like this:

public slots:
    showit(int i);

Is the show() signal declared as a signal in your thread class like this:

signals:
    show(int i);

Also, do you have Q_OBJECT in your Widget class declaration? (you need Q_OBJECT for any class that has signals or slots). You need Q_OBJECT in your thread class too.

If you add Q_OBJECT, you have to re-run &quot;qmake&quot; by the way.

--Dave</description>
		<content:encoded><![CDATA[<p>Oh, and a couple more things:</p>
<p>Is your method showit() declared as a &#8220;slot&#8221;, and not just &#8220;public&#8221;, like this:</p>
<p>public slots:<br />
    showit(int i);</p>
<p>Is the show() signal declared as a signal in your thread class like this:</p>
<p>signals:<br />
    show(int i);</p>
<p>Also, do you have Q_OBJECT in your Widget class declaration? (you need Q_OBJECT for any class that has signals or slots). You need Q_OBJECT in your thread class too.</p>
<p>If you add Q_OBJECT, you have to re-run &#8220;qmake&#8221; by the way.</p>
<p>&#8211;Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-98824</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sun, 21 Feb 2010 16:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-98824</guid>
		<description>Victor, do you see any warnings on the command line when you run your app (on Windows, you need to add &quot;CONFIG += console&quot; to your .pro file). 

I ask because sometimes if you have a typo in your connect() call with your SIGNAL and SLOT text, you won&#039;t see an error in the compiler, but on the command line, you will see a warning when connect() is called.

Also, what is &quot;W&quot;? This should be your thread, not your widget, right?

Lastly, have you used qDebug()? Very handy. Just #include &lt;qtdebug&gt; and then you can add debug output like this:

qDebug() &lt;&lt; &quot;showit called with value&quot; &lt;&lt; i;

Let me know.&lt;/qtdebug&gt;</description>
		<content:encoded><![CDATA[<p>Victor, do you see any warnings on the command line when you run your app (on Windows, you need to add &#8220;CONFIG += console&#8221; to your .pro file). </p>
<p>I ask because sometimes if you have a typo in your connect() call with your SIGNAL and SLOT text, you won&#8217;t see an error in the compiler, but on the command line, you will see a warning when connect() is called.</p>
<p>Also, what is &#8220;W&#8221;? This should be your thread, not your widget, right?</p>
<p>Lastly, have you used qDebug()? Very handy. Just #include <qtdebug> and then you can add debug output like this:</p>
<p>qDebug() < < "showit called with value" << i;</p>
<p>Let me know.</qtdebug></qtdebug></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor Jetten</title>
		<link>http://thesmithfam.org/blog/2009/09/30/lock-free-multi-threading-in-qt/comment-page-1/#comment-98823</link>
		<dc:creator>Victor Jetten</dc:creator>
		<pubDate>Sun, 21 Feb 2010 15:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://thesmithfam.org/blog/?p=472#comment-98823</guid>
		<description>thanks for helping. Showit is nothing else but:
void mod6::showit(const int i)
{
	label-&gt;setNum(i);
}
where mod6 is the interface class. 
In the original prog the thread is a waterbalance model that can run for several hours and gives a lot of results back to the interface at each loop (values, a graph, digital maps). During the run the interface cannot block because the user may need to do things (zoom in and so on). I was also looking at the mandelbrot example in Qt but I liked your mutex-less example.</description>
		<content:encoded><![CDATA[<p>thanks for helping. Showit is nothing else but:<br />
void mod6::showit(const int i)<br />
{<br />
	label-&gt;setNum(i);<br />
}<br />
where mod6 is the interface class.<br />
In the original prog the thread is a waterbalance model that can run for several hours and gives a lot of results back to the interface at each loop (values, a graph, digital maps). During the run the interface cannot block because the user may need to do things (zoom in and so on). I was also looking at the mandelbrot example in Qt but I liked your mutex-less example.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

