[Boost-bugs] [Boost C++ Libraries] #2161: Vc90 managed application fails to initialize when using boost/thread

Subject: [Boost-bugs] [Boost C++ Libraries] #2161: Vc90 managed application fails to initialize when using boost/thread
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-02 01:53:22


#2161: Vc90 managed application fails to initialize when using boost/thread
---------------------------------------------+------------------------------
 Reporter: andreik_at_[hidden] | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: thread
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: |
---------------------------------------------+------------------------------
 Nicely working application compiled by vc80 stopped working when compiled
 under vc90.
 The problem was narrowed down to boost\thread use.
 To reproduce generate managed "hello world" console app and copy the code
 below into main.
 The issue was reported to Mark Levine and Ronald Laerenans at Microsoft
 but they have not replied...

 #include "stdafx.h"
 #pragma managed(push, off)
 #include <iostream>
 #include <boost/thread/condition.hpp>
 #include <boost/thread/mutex.hpp>
 #pragma managed(pop)

 class Unmanaged
 {
 public:
     Unmanaged()
     {
         std::cout << __FUNCTION__ << std::endl;
     }

     ~Unmanaged()
     {
         std::cout << __FUNCTION__ << std::endl;
     }

    void Wait()
    {
         std::cout << __FUNCTION__ << std::endl;
         boost::mutex::scoped_lock lock(m_mutex);
         //m_condition.wait(lock);
    }

 private:
     boost::condition m_condition;
     boost::mutex m_mutex;
 };

 int main(array<System::String^>^ args)
 {
     System::Console::WriteLine(L"Hello World");
     Unmanaged unmgd;
     unmgd.Wait();
     return 0;
 }

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/2161>
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:49:58 UTC