[Boost-bugs] [Boost C++ Libraries] #5150: boost::thread does not print or return the error value when creating a thread fails.

Subject: [Boost-bugs] [Boost C++ Libraries] #5150: boost::thread does not print or return the error value when creating a thread fails.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-02 15:22:53


#5150: boost::thread does not print or return the error value when creating a
thread fails.
-----------------------------------------+----------------------------------
 Reporter: jukka.jylanki@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.45.0 | Severity: Problem
 Keywords: |
-----------------------------------------+----------------------------------
 I'm running on Win7 64bit Professional, and building 32-bit code on
 MSVC2008.

 For some reason, I'm getting boost::thread_resource_error from void
 thread::start_thread() in
 http://svn.boost.org/svn/boost/trunk/libs/thread/src/win32/thread.cpp ,
 but I'm unable to debug this issue, since the boost sources don't check
 for the error value of when this call fails.

 http://msdn.microsoft.com/en-us/library/kdzttdcb(v=vs.80).aspx specifies
 that _beginthreadex returns 0 on an error, in which case errno and
 _doserrno are set.

 Expected: The value of errno is caught in the code and passed in the
 exception so that the client can debug the reason of the failure.

 (The following background for some context, although it's such a voodoo
 situation I can not report that as a bug directly, better start with the
 above first)

 My code that uses boost threads worked ok previously, and curiously it was
 that incorporating the use of QScriptEngineDebugger from Qt 4.6 into my
 application started exhibiting this problem. If I remove the use of
 QScriptEngineDebugger, the thread is created fine. I am using less than
 100MB of memory, and my application is running about 15 threads, so it
 shouldn't be a system resource consumption issue.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5150>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC