Update of /cvsroot/boost/boost/libs/thread/doc
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4052/libs/thread/doc

Modified Files:
      Tag: RC_1_34_0
        faq.xml 
Log Message:
Merged from HEAD.


Index: faq.xml
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/doc/faq.xml,v
retrieving revision 1.3.10.2
retrieving revision 1.3.10.3
diff -u -d -r1.3.10.2 -r1.3.10.3
--- faq.xml     15 Oct 2006 14:52:53 -0000      1.3.10.2
+++ faq.xml     11 Feb 2007 13:55:21 -0000      1.3.10.3
@@ -210,5 +210,26 @@
                condition variable.</para>
          </answer>
        </qandaentry>
+       <qandaentry>
+         <question>
+           <para>Why doesn't the thread's ctor take at least a void* to pass 
any
+           information along with the function? All other threading libs 
support
+           that and it makes Boost.Threads inferiour. </para>
+         </question>
+         <answer>
+           <para>There is no need, because Boost.Threads are superiour! First
+           thing is that its ctor doesn't take a function but a functor. That
+           means that you can pass an object with an overloaded operator() and
+           include additional data as members in that object. Beware though 
that
+           this object is copied, use boost::ref to prevent that. Secondly, 
even
+           a boost::function<void (void)> can carry parameters, you only have 
to
+           use boost::bind() to create it from any function and bind its 
+           parameters.</para>
+           <para>That is also why Boost.Threads are superiour, because they
+           don't require you to pass a type-unsafe void pointer. Rather, you 
can
+           use the flexible Boost.Functions to create a thread entry out of
+           anything that can be called.</para>
+         </answer>
+       </qandaentry>
   </qandaset>
 </section>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to