<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-35024958.post597620810828712508..comments</id><updated>2010-01-28T14:46:05.008+11:00</updated><category term='templates'/><category term='static_assert'/><category term='threads'/><category term='timer'/><category term='decltype'/><category term='sfinae'/><category term='error_code'/><category term='ssl'/><category term='c++0x'/><category term='parallelism'/><category term='boost'/><category term='iostream'/><category term='c++'/><category term='timeout'/><category term='asio'/><category term='system_error'/><category term='bind'/><category term='hardware'/><category term='coroutines'/><title type='text'>Comments on Thinking Asynchronously in C++: Secret sauce revealed</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.think-async.com/feeds/597620810828712508/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html'/><author><name>chris</name><uri>http://www.blogger.com/profile/09159109667366328919</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-35024958.post-5067759346667201366</id><published>2010-01-28T14:46:05.008+11:00</published><updated>2010-01-28T14:46:05.008+11:00</updated><title type='text'>Perhaps user error, but in VC9 this sample seems t...</title><content type='html'>Perhaps user error, but in VC9 this sample seems to build in Debug but not in Release. An attempt at a release build causes a link error for &amp;#39;you_forgot_to_add_the_entry_label&amp;#39; despite the fact that the code builds and runs with a debug build.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/5067759346667201366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/5067759346667201366'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1264650365008#c5067759346667201366' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-261532998'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-6506183762623765726</id><published>2009-12-26T10:14:35.956+11:00</published><updated>2009-12-26T10:14:35.956+11:00</updated><title type='text'>You should explain how those macros work. There se...</title><content type='html'>You should explain how those macros work. There seem to be many &amp;quot;tricks&amp;quot; that are useful but aren&amp;#39;t required to make coroutines work.&lt;br /&gt;&lt;br /&gt;For example, it *seems* to me that the for loop inside &amp;#39;yield&amp;#39; is just a trick to execute something *after* the yield expression while not making yield use function syntax.&lt;br /&gt;&lt;br /&gt;Similarly for you_forgot_to_add_the_entry_label. I suspect it would be easier to follow if you remove the &amp;quot;feature&amp;quot; of: giving a readable warning if you forget the entry label.&lt;br /&gt;&lt;br /&gt;Maybe show it as a tutorial for creating such a macro. Start simple, then add the tricks one by one...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/6506183762623765726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/6506183762623765726'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1261782875956#c6506183762623765726' title=''/><author><name>Nicolás</name><uri>http://www.blogger.com/profile/10651940049223046311</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-408934988'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-1934419239410968042</id><published>2009-08-27T20:11:56.424+10:00</published><updated>2009-08-27T20:11:56.424+10:00</updated><title type='text'>@chris I ran into the local class used as a templa...</title><content type='html'>@chris I ran into the local class used as a template argument error today. Good call. I -was- using Visual Studio VC9, and now I&amp;#39;m using MinGW.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/1934419239410968042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/1934419239410968042'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1251367916424#c1934419239410968042' title=''/><author><name>Eric Muyser</name><uri>http://www.blogger.com/profile/15434323864916255798</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-732641862'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-7803787959813040695</id><published>2009-08-23T19:21:23.191+10:00</published><updated>2009-08-23T19:21:23.191+10:00</updated><title type='text'>I will like C++0x lambdas when we get to that poin...</title><content type='html'>I will like C++0x lambdas when we get to that point. Until then..&lt;br /&gt;&lt;br /&gt;No the first argument is just the name of the local class. Second argument is the main class all the callbacks are inside, simply because &amp;#39;this&amp;#39; pointer changes. Can&amp;#39;t access variables outside the inner scopes, so boxing/unboxing named variable list. Really shotty, but it seems to work. It&amp;#39;s like extremely verbose ActionScript/JavaScript function objects (usually used as callbacks).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/7803787959813040695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/7803787959813040695'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1251019283191#c7803787959813040695' title=''/><author><name>Eric Muyser</name><uri>http://www.blogger.com/profile/15434323864916255798</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-732641862'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-4092949639793827497</id><published>2009-08-23T08:58:27.659+10:00</published><updated>2009-08-23T08:58:27.659+10:00</updated><title type='text'>@Daemn: Looks like you would like C++0x lambdas th...</title><content type='html'>@Daemn: Looks like you would like C++0x lambdas then. However, I&amp;#39;m a little confused: don&amp;#39;t your macros create local classes? What compiler are you using, because (pre-C++0x) you can&amp;#39;t use local classes as template parameters.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/4092949639793827497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/4092949639793827497'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1250981907659#c4092949639793827497' title=''/><author><name>chris</name><uri>http://www.blogger.com/profile/09159109667366328919</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-660467121'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-3093185249211026175</id><published>2009-08-22T21:56:28.701+10:00</published><updated>2009-08-22T21:56:28.701+10:00</updated><title type='text'>BTW I&amp;#39;m still debugging that code, it&amp;#39;s na...</title><content type='html'>BTW I&amp;#39;m still debugging that code, it&amp;#39;s nasty, but gets the point across.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/3093185249211026175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/3093185249211026175'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1250942188701#c3093185249211026175' title=''/><author><name>Daemn</name><uri>http://www.blogger.com/profile/15542398818885890025</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-848414277'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-3014765752541655346</id><published>2009-08-22T21:55:01.483+10:00</published><updated>2009-08-22T21:55:01.483+10:00</updated><title type='text'>That&amp;#39;s interesting...

I wanted easier program...</title><content type='html'>That&amp;#39;s interesting...&lt;br /&gt;&lt;br /&gt;I wanted easier program flow usage, and didn&amp;#39;t want to embed a scripting language (yet). So I wrapped it up in a macro (&amp;quot;CREATE_CALLBACK&amp;quot;)..&lt;br /&gt;&lt;br /&gt;http://pastebin.ca/1538834&lt;br /&gt;&lt;br /&gt;Instead of deriving my class, Application::Main, from it, I pass it a an argument. Not really the same as a coroutine, but the point was the same (&amp;quot;the control flow is all in one place and easy to follow&amp;quot;). I find using Asio a lot easier this way. Any suggestions?&lt;br /&gt;&lt;br /&gt;Thanks again for Asio!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/3014765752541655346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/3014765752541655346'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1250942101483#c3014765752541655346' title=''/><author><name>Daemn</name><uri>http://www.blogger.com/profile/15542398818885890025</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-848414277'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-6797880581217233205</id><published>2009-08-12T08:15:23.234+10:00</published><updated>2009-08-12T08:15:23.234+10:00</updated><title type='text'>That&amp;#39;s correct. If you want your coroutine to ...</title><content type='html'>That&amp;#39;s correct. If you want your coroutine to have &amp;quot;local&amp;quot; variables, you should make them data members of the function object.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/6797880581217233205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/6797880581217233205'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1250028923234#c6797880581217233205' title=''/><author><name>chris</name><uri>http://www.blogger.com/profile/09159109667366328919</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-660467121'/></entry><entry><id>tag:blogger.com,1999:blog-35024958.post-1779448747009491483</id><published>2009-08-12T05:33:06.068+10:00</published><updated>2009-08-12T05:33:06.068+10:00</updated><title type='text'>Question:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  voi...</title><content type='html'>Question:&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;  void operator()(&lt;br /&gt;      error_code ec = error_code(),&lt;br /&gt;      size_t length = 0)&lt;br /&gt;  {&lt;br /&gt;    int a = 0;&lt;br /&gt;&lt;br /&gt;    reenter (this)&lt;br /&gt;    {&lt;br /&gt;    entry:&lt;br /&gt;      for (;;)&lt;br /&gt;      {&lt;br /&gt;        yield acceptor_.async_accept(&lt;br /&gt;            *socket_, *this);&lt;br /&gt;&lt;br /&gt;        a = 1;&lt;br /&gt;&lt;br /&gt;        while (!ec)&lt;br /&gt;        {&lt;br /&gt;          yield socket_-&amp;gt;async_read_some(&lt;br /&gt;              buffer(*data_), *this);&lt;br /&gt;&lt;br /&gt;          // what is a here?&lt;br /&gt;          a = 1;&lt;br /&gt;&lt;br /&gt;          if (ec) break;&lt;br /&gt;&lt;br /&gt;          yield async_write(*socket_,&lt;br /&gt;              buffer(*data_, length), *this);&lt;br /&gt;&lt;br /&gt;          // what is a here?&lt;br /&gt;          a = 2;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        socket_-&amp;gt;close();&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;I think &amp;quot;a&amp;quot; at question places will always be 0. Am I right?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/1779448747009491483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35024958/597620810828712508/comments/default/1779448747009491483'/><link rel='alternate' type='text/html' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html?showComment=1250019186068#c1779448747009491483' title=''/><author><name>Marat</name><uri>http://www.blogger.com/profile/01714473137005987457</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='04726646850901652514'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.think-async.com/2009/08/secret-sauce-revealed.html' ref='tag:blogger.com,1999:blog-35024958.post-597620810828712508' source='http://www.blogger.com/feeds/35024958/posts/default/597620810828712508' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1465827697'/></entry></feed>
