Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

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.

Source Link
geekpp
  • 136
  • 2

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.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /