Initial threading support for NetCom Simulator

While trying to make GLog module thread safe, I have been wondering if I should directly use the pthread APIs, Boost.Thread, or write a GThread module that wraps up either of them. After some struggling, I decided to use Boost.Thread directly for the moment, both from the gUtil layer and from application codes. Reasons:

  1. I do not have extensive experience in multithreading, thus might not be able to produce a reliable and scalable GThread module, at least not for now.
  2. Boost.Thread has provided some convenient utilities, such as mutex::scoped_lock.
  3. Although there are developers complaining performance difference between Boost.Thread and pthread APIs, the codes for component with performance bottleneck can be refactor to use pthread APIs instead later on.

Anyway, GThread module is not in the current release plan.

Comments are closed.