&nbsp;&nbsp;&nbsp; The question of whether anyone had developed a C++ implementation of Twisted&#39;s Deferreds has cropped up on this list several times over the last few years. To date, I&#39;ve unfortunately been forced to sit on an implementation I developed several years ago for the Department of Defense. Due to some rather draconian IP &amp; security policies, it&#39;s taken an exceptionally long time to get the code released. I&#39;m happy to announce though that I finally managed to obtain release authorization for it and that the code now has a new home on Sourceforge.<br>
<br>&nbsp;&nbsp;&nbsp; As C++ has differing language features, the API of the C++ deferreds isn&#39;t identical to those of Twisted&#39;s but most of the key concepts mapped over pretty well. Additionally, this implementation has a few design extensions to facilitate the development multi-threaded C++ applications. The multi-threaded aspect grew almost accidentally out of the original single-threaded design but, since then, it has proven to be extraordinarily useful for simplifying several multi-threaded applications I&#39;ve worked on.<br>
<br>&nbsp;&nbsp;&nbsp; The implementation of the library is, however, rather complex. In large part, this is due to the effort required to work around the inherent inflexibility of the C++ type system. The Function, Bind, and Meta-Programming libraries found in Boost have gone a long way towards simplify the implementation though (my original Loki-based attempt was almost incomprehensible even to me ;-). The library is fully documented though so as long as you&#39;re reasonably comfortable with C++ templates, it should be understandable.<br>
<br>&nbsp;&nbsp;&nbsp; So far, the library has only been exposed to a handful of individuals
for review. I&#39;d be interested to hear the
comments anyone has about the design and/or implementation approach. The
code is available at:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://deferred.svn.sourceforge.net/viewvc/deferred/">http://deferred.svn.sourceforge.net/viewvc/deferred/</a><br><br>&nbsp;&nbsp;&nbsp; Cheers,<br><br>&nbsp;&nbsp;&nbsp; Tom<br>