On 5/15/2010 10:00 AM, martabm wrote:
Hi everyone.

In an existing and large visual c++ application, I want to port threads from windows.h ones (CreateThread function) to boost.thread.

Due to the size of the application I must do it progressively, so it means, during a while, the coexistence of windows threads with boost threads. Is it a bad idea? Can they work together? Threads here are synchronized by events and critical sections which also I want to port to boost Condition Variables and Mutexes.


I just did this for a large application, a little bit at a time.

It worked fine.

In fact, I think things got better and easier to understand, all the
WaitFor*Object calls disappeared into nice clean RAII structures,
other nice things like "interrupt" came for free, etc, etc.

And I really liked being able to use condition variables instead
of a mix of other sync objects, that cleaned up a ton of unclear
rat's nest of code, as well as getting rid of a few places where
I was using windows Events in ways known to be broken and
deprecated.