I suggest to replace your code with the implementation of boost.lockfree and boost.thread to be system independant.
- boost.lockfree for message passing (replacing yor queue vector with it)
- boost.thread (or standard threads if you have a c+11 compiler) to replace threading and synchronisation with platform agnostic calls (same interface as the standard c+11 thread interface)
As for the mutex vs critical section debate, fork0 is wrong. look here for a proof here for a proof.
I suggest to replace your code with the implementation of boost.lockfree and boost.thread to be system independant.
- boost.lockfree for message passing (replacing yor queue vector with it)
- boost.thread (or standard threads if you have a c+11 compiler) to replace threading and synchronisation with platform agnostic calls (same interface as the standard c+11 thread interface)
As for the mutex vs critical section debate, fork0 is wrong. look here for a proof.
I suggest to replace your code with the implementation of boost.lockfree and boost.thread to be system independant.
- boost.lockfree for message passing (replacing yor queue vector with it)
- boost.thread (or standard threads if you have a c+11 compiler) to replace threading and synchronisation with platform agnostic calls (same interface as the standard c+11 thread interface)
As for the mutex vs critical section debate, fork0 is wrong. look here for a proof.
I suggest to replace your code with the implementation of boost.lockfree and boost.thread to be system independant.
- boost.lockfree for message passing (replacing yor queue vector with it)
- boost.thread (or standard threads if you have a c+11 compiler) to replace threading and synchronisation with platform agnostic calls (same interface as the standard c+11 thread interface)
As for the mutex vs critical section debate, fork0 is wrong. look here for a proof.