<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for My desperate life quest for efficiency</title>
	<link>http://efiquest.org</link>
	<description>(mostly in programming and *nix administration)</description>
	<pubDate>Fri, 10 Sep 2010 16:18:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>Comment on A reliable way to serialize/unserialize objects in PHP by container class</title>
		<link>http://efiquest.org/2007-12-10/6/#comment-934</link>
		<dc:creator>container class</dc:creator>
		<pubDate>Sat, 03 Apr 2010 12:57:20 +0000</pubDate>
		<guid>http://efiquest.org/2007-12-10/6/#comment-934</guid>
		<description>[...] ... 251 + 251 equals 502, and since the container is 501px wide, it can't fit in the same row. ...My desperate life quest for efficiency Blog Archive A ...Then, the only class file that needs to be located is the container's class file. ... Mail (will not [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] &#8230; 251 + 251 equals 502, and since the container is 501px wide, it can&#8217;t fit in the same row. &#8230;My desperate life quest for efficiency Blog Archive A &#8230;Then, the only class file that needs to be located is the container&#8217;s class file. &#8230; Mail (will not [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Speeding up Apache static content serving with nginx by pachanga</title>
		<link>http://efiquest.org/2007-09-28/5/#comment-920</link>
		<dc:creator>pachanga</dc:creator>
		<pubDate>Mon, 22 Mar 2010 05:19:41 +0000</pubDate>
		<guid>http://efiquest.org/2007-09-28/5/#comment-920</guid>
		<description>Well, I've never done it...but I do believe it can be possible somehow. I think you'd better consult nginx documentaion or mailing list.</description>
		<content:encoded><![CDATA[<p>Well, I&#8217;ve never done it&#8230;but I do believe it can be possible somehow. I think you&#8217;d better consult nginx documentaion or mailing list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Speeding up Apache static content serving with nginx by Hartmut</title>
		<link>http://efiquest.org/2007-09-28/5/#comment-917</link>
		<dc:creator>Hartmut</dc:creator>
		<pubDate>Sun, 21 Mar 2010 14:21:35 +0000</pubDate>
		<guid>http://efiquest.org/2007-09-28/5/#comment-917</guid>
		<description>Thanks for this report on using nginx. I have a question about using nginx also as a proxy for SSL-Connections. Is it possible to forward this requests also to apache?!

Hartmut</description>
		<content:encoded><![CDATA[<p>Thanks for this report on using nginx. I have a question about using nginx also as a proxy for SSL-Connections. Is it possible to forward this requests also to apache?!</p>
<p>Hartmut</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using boost::threadpool with boost::future by pachanga</title>
		<link>http://efiquest.org/2009-12-10/40/#comment-641</link>
		<dc:creator>pachanga</dc:creator>
		<pubDate>Thu, 10 Dec 2009 06:59:24 +0000</pubDate>
		<guid>http://efiquest.org/2009-12-10/40/#comment-641</guid>
		<description>This should be very easy to achieve with a simple wrapper around the task. For example:

&lt;pre lang="cpp"&gt;
template&lt;typename Task, typename Callback
struct TaskWithNotification
{
  TaskWithNotification(Task t, Callback c)
    : task(t),
      callback(c)
  {}

  void operator()()
  {
     callback(task());
  }
};
&lt;/pre&gt;

...and the usage is straightforward:

&lt;pre lang="cpp"&gt;
submit_job(
   threadpool, 
   TaskWithNotification(
     boost::bind(LoadUserTask, userId), 
     boost::bind(OnUserLoad, _1))
);
&lt;/pre&gt;

In C++0x completion handler can be a lambda.</description>
		<content:encoded><![CDATA[<p>This should be very easy to achieve with a simple wrapper around the task. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">template</span><span style="color: #000080;">&lt;</span><span style="color: #0000ff;">typename</span> Task, <span style="color: #0000ff;">typename</span> Callback
<span style="color: #0000ff;">struct</span> TaskWithNotification
<span style="color: #008000;">&#123;</span>
  TaskWithNotification<span style="color: #008000;">&#40;</span>Task t, Callback c<span style="color: #008000;">&#41;</span>
    <span style="color: #008080;">:</span> task<span style="color: #008000;">&#40;</span>t<span style="color: #008000;">&#41;</span>,
      callback<span style="color: #008000;">&#40;</span>c<span style="color: #008000;">&#41;</span>
  <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
&nbsp;
  <span style="color: #0000ff;">void</span> operator<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
  <span style="color: #008000;">&#123;</span>
     callback<span style="color: #008000;">&#40;</span>task<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
  <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></pre></div></div>

<p>&#8230;and the usage is straightforward:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">submit_job<span style="color: #008000;">&#40;</span>
   threadpool, 
   TaskWithNotification<span style="color: #008000;">&#40;</span>
     boost<span style="color: #008080;">::</span><span style="color: #007788;">bind</span><span style="color: #008000;">&#40;</span>LoadUserTask, userId<span style="color: #008000;">&#41;</span>, 
     boost<span style="color: #008080;">::</span><span style="color: #007788;">bind</span><span style="color: #008000;">&#40;</span>OnUserLoad, _1<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>In C++0x completion handler can be a lambda.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using boost::threadpool with boost::future by Denis Bazhenov</title>
		<link>http://efiquest.org/2009-12-10/40/#comment-637</link>
		<dc:creator>Denis Bazhenov</dc:creator>
		<pubDate>Wed, 09 Dec 2009 23:45:25 +0000</pubDate>
		<guid>http://efiquest.org/2009-12-10/40/#comment-637</guid>
		<description>Conception of Futures very popular on Java Platform also. But there is one thing that I'm missing in Futures - asynchronous completition. Sometimes there is no need to wait for task to complete. All I need is to give task and completition function to thread pool. For example:

&lt;pre lang="java"&gt;
Callable task = new LoadUserTask(userId);
executor.submit(task, new CompletionHandler {
  public void onComplete(User user) {
    user.setLastLoginTime(now());
  }
});
&lt;/pre&gt;

Is there something similar in C++?</description>
		<content:encoded><![CDATA[<p>Conception of Futures very popular on Java Platform also. But there is one thing that I&#8217;m missing in Futures - asynchronous completition. Sometimes there is no need to wait for task to complete. All I need is to give task and completition function to thread pool. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Callable task <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> LoadUserTask<span style="color: #009900;">&#40;</span>userId<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
executor.<span style="color: #006633;">submit</span><span style="color: #009900;">&#40;</span>task, <span style="color: #000000; font-weight: bold;">new</span> CompletionHandler <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onComplete<span style="color: #009900;">&#40;</span>User user<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    user.<span style="color: #006633;">setLastLoginTime</span><span style="color: #009900;">&#40;</span>now<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Is there something similar in C++?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zveriki is the prize-winner of &#8220;The best online game&#8221; KRI2009-Award by pachanga</title>
		<link>http://efiquest.org/2009-05-19/37/#comment-375</link>
		<dc:creator>pachanga</dc:creator>
		<pubDate>Wed, 20 May 2009 05:18:16 +0000</pubDate>
		<guid>http://efiquest.org/2009-05-19/37/#comment-375</guid>
		<description>Thanks :D</description>
		<content:encoded><![CDATA[<p>Thanks <img src='http://efiquest.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Zveriki is the prize-winner of &#8220;The best online game&#8221; KRI2009-Award by .sid</title>
		<link>http://efiquest.org/2009-05-19/37/#comment-374</link>
		<dc:creator>.sid</dc:creator>
		<pubDate>Tue, 19 May 2009 22:15:54 +0000</pubDate>
		<guid>http://efiquest.org/2009-05-19/37/#comment-374</guid>
		<description>My congratulations.</description>
		<content:encoded><![CDATA[<p>My congratulations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A reliable way to serialize/unserialize objects in PHP by Autoload Magic &#124; Straylight Run</title>
		<link>http://efiquest.org/2007-12-10/6/#comment-365</link>
		<dc:creator>Autoload Magic &#124; Straylight Run</dc:creator>
		<pubDate>Thu, 07 May 2009 00:06:28 +0000</pubDate>
		<guid>http://efiquest.org/2007-12-10/6/#comment-365</guid>
		<description>[...] Use a special container class that all other classes inherit from. This method is suitable mostly when attempting to unserialize objects (when unserializing objects, PHP must have the class definition to recover the object). This special container will automatically know the class file for the contained object. Then, the only class file that needs to be located is the container&#8217;s class file. (Autoloading in the context of object un/serialization is a special case of class loading.) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Use a special container class that all other classes inherit from. This method is suitable mostly when attempting to unserialize objects (when unserializing objects, PHP must have the class definition to recover the object). This special container will automatically know the class file for the contained object. Then, the only class file that needs to be located is the container&#8217;s class file. (Autoloading in the context of object un/serialization is a special case of class loading.) [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Announcing zveriki.com by pachanga</title>
		<link>http://efiquest.org/2008-08-25/30/#comment-282</link>
		<dc:creator>pachanga</dc:creator>
		<pubDate>Fri, 05 Sep 2008 05:36:06 +0000</pubDate>
		<guid>http://efiquest.org/2008-08-25/30/#comment-282</guid>
		<description>Oh, it's November 2008, of course. Thanks.</description>
		<content:encoded><![CDATA[<p>Oh, it&#8217;s November 2008, of course. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Announcing zveriki.com by Ilia M.</title>
		<link>http://efiquest.org/2008-08-25/30/#comment-281</link>
		<dc:creator>Ilia M.</dc:creator>
		<pubDate>Thu, 04 Sep 2008 22:18:22 +0000</pubDate>
		<guid>http://efiquest.org/2008-08-25/30/#comment-281</guid>
		<description>Do you really mean November 2008?</description>
		<content:encoded><![CDATA[<p>Do you really mean November 2008?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
