Boost C++ Libraries: Ticket #104: BCB6 throw EExternelException https://svn.boost.org/trac10/ticket/104 <pre class="wiki">Borland C++ Builder 6 would throw an exception ( EExternelException ) in simple example: -------- example in thread document ----- Simple usage of boost::thread #include &lt;boost/thread/thread.hpp&gt; #include &lt;iostream&gt; struct thread_alarm { thread_alarm(int secs) : m_secs(secs) { } void operator()() { boost::xtime XT; boost::xtime_get(&amp;XT, boost::TIME_UTC); xt.sec += m_secs; boost::thread::sleep(XT); std::cout &lt;&lt; "alarm sounded..." &lt;&lt; std::endl; } int m_secs; }; int main(int argc, char* argv[]) { int secs = 5; std::cout &lt;&lt; "setting alarm for 5 seconds..." &lt;&lt; std::endl; thread_alarm alarm(secs); boost::thread thrd(alarm); thrd.join(); } ----- end of example ----- </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/104 Trac 1.4.3 Nicola Musatti Thu, 21 Sep 2006 15:06:57 GMT status changed https://svn.boost.org/trac10/ticket/104#comment:1 https://svn.boost.org/trac10/ticket/104#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=88359 When the example is modified to compile with Boost 1.33.1 it executes without errors. Here's the corrected code: #include &lt;boost/thread/thread.hpp&gt; #include &lt;boost/thread/xtime.hpp&gt; #include &lt;iostream&gt; struct thread_alarm { thread_alarm(int secs) : m_secs(secs) { } void operator()() { boost::xtime XT; boost::xtime_get(&amp;XT, boost::TIME_UTC); XT.sec += m_secs; boost::thread::sleep(XT); std::cout &lt;&lt; "alarm sounded..." &lt;&lt; std::endl; } int m_secs; }; int main(int argc, char* argv[]) { int secs = 5; std::cout &lt;&lt; "setting alarm for 5 seconds..." &lt;&lt; std::endl; thread_alarm alarm(secs); boost::thread thrd(alarm); thrd.join(); } </pre> Ticket