Questions tagged [boost-thread]

Boost.Thread enables the use of multiple threads of execution with shared data in portable C++ code.

Boost.Thread enables the use of multiple threads of execution with shared data in portable C++ code. It provides classes and functions for managing the threads themselves, along with others for synchronizing data between the threads or providing separate copies of data specific to individual threads.

The Boost.Thread library was originally written and designed by William E. Kempf. For Boost 1.35+, Anthony Williams performed a major rewrite designed to closely follow the proposals presented to the C++ Standards Committee, in particular N2497, N2320, N2184, N2139, and N2094.

As of Boost version 1.50.0 Boost.Thread provides an almost complete implementation of the C++ 2011 Threads library, plus extensions such as shared locks and thread interruption.

885 questions
0
votes
3 answers

boost two threads

C++ Boost question about loops. So I've been looking over as much information as I can and still not seeing any examples of what I am trying to do or the principles of how it works. I've been working in my spare time for a few years on designing a…
0
votes
1 answer

Boost Asio, asynchronous server and video tracking

I need to trasmit with a (Boost) tcp server information collected in real time by the ARToolKit video tracking library. Which is the right way of doing it? I'm actually doing it with Boost threads and asio, but I think that what I do is done in a…
UnableToLoad
  • 315
  • 6
  • 18
0
votes
0 answers

Boost thread run-time error in Win32 DLL project

I'm working with a C++ DLL project. I tried to use simple boost thread in there. here is the source-code. this run time exception at uploadThread = boost::thread(uploadFileThread); line. Any idea? Unhandled exception at 0x6fa1bd89 (Controller.dll)…
Nayana Adassuriya
  • 23,596
  • 30
  • 104
  • 147
0
votes
2 answers

does boost::thread::timed_join(0) acquire a lock?

I need to check if my boost::thread I've created is running from another thread. This SO post explains you can do this by calling: boost::posix_time::seconds waitTime(0); myBoostThread.timed_join(waitTime); I can't have any critical sections in my…
elSnape
  • 302
  • 1
  • 12
0
votes
1 answer

C++ Boost::thread upgradable mutex "try upgrade lock"?

I implemented boost upgradable mutexes following the top answer here Example of how to use boost upgradeable mutexes What I would like to do is to "try" whether or not the upgrade will block: if the upgrade will not block performs the upgrade,…
Jeremy
  • 4,797
  • 1
  • 18
  • 26
0
votes
1 answer

My process crash before main ,by datamngr.dll

My process crashes before main, on boost code: myexe.exe!boost::`anonymous namespace'::run_thread_exit_callbacks() + 0xe6 bytes C++ The process written in c++ native for windows The only strange thing I noticed , that my exe load dll that is not…
0
votes
1 answer

C++ How to Catch a Exception Thrown by a Thread in Boost from the Thread-Spawning Function

I have a C++ application in which I use Boost Threads to provide concurrency. The basic sample is as follows: processingThreadGroup->create_thread(boost::bind(process, clientSideSocket, this)); Here, processingThreadGroup is a shared pointer to a…
Izza
  • 2,389
  • 8
  • 38
  • 60
0
votes
1 answer

Using boost::bind with a class containing a boost::mutex

I'm working on a server using a watchdir to add items to an internal collection. The watchdir is browsed periodically by a thread which is created like this : this->watchDirThread = new boost::thread(boost::bind(&Filesystem::watchDirThreadLoop, …
Opera
  • 983
  • 1
  • 6
  • 17
0
votes
1 answer

Boost asio io service memcpy()

I have build application based on boost::asio. Sometimes I got this kind of core dump (not regullary). I tried investigate what's going on but I haven't more ideas to solve it. In my point of view I think that could be some problem inside io service…
0
votes
1 answer

c++ - cli application compiled on Windows 8 can not start on Windows Server 2008 R2 if boost/thread.hpp is included

My application starts fine on my Windows 8 laptop. However I can not start it on Windows Server 2008 R2. Following error occured: The exception unknown software exception (0xe0434352) occured in the application at location 0xfd5ecaed. The following…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
0
votes
2 answers

Will it work to pass a reference to a base class to boost::thread, and have virtual functions in the derived class called?

Suppose I have: class Base { public: void operator()() { this->run(); } virtual void run () {} } class Derived : public Base { public: virtual void run () { // Will…
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181
0
votes
1 answer

C++ linking shared object lib including static boost lib and dynamic boost lib together

I am currently writing an application in C++ using an API to grab images from a camera. This API is a shared object and was build using the static boost thread lib (v1.40). In my application I also want to use the boost threads, but when I link…
0
votes
2 answers

boost microsec_time_clock.hpp warning C4244

I'm new in using boost and have a problem. I need shared_mutex function in my project. So I've done #include "boost/thread/shared_mutex.hpp" And compiled my project. My MSVC 2005 with "treat warnings as errors" stops compilation because of a…
f0b0s
  • 2,978
  • 26
  • 30
0
votes
1 answer

Boost synchronous Client and Server - infinite loop blocking the rest

i'm using a synch server and client that reads in an infinite loop. for (;;){ boost::system::error_code error; read(socket,boost::asio::buffer(&abc, sizeof(abc))); ... } what would be the best way to resolve the blocking of the rest of the…
ddd
  • 481
  • 6
  • 17
0
votes
1 answer

wxwidgets's mainloop() and boost::thread

In short I'm trying to implement a GUI to my networking app. Both of them have mainloop() so I'm trying to put them into separate threads and I'm using boost::thread for it. //standard initialization of boost::thread GuiThread.join(); …
Red_Dot
  • 41
  • 5