open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
61 stars 10 forks source link

Passing thread_count from the ctor. #680

Closed davidhjp01 closed 2 years ago

davidhjp01 commented 2 years ago

Just added a small modification to pass thread_count via ctor of fixed_stepalgorithm. When `threads.empty()`, thread_pool executes the function directly without queuing.

markaren commented 2 years ago

thread_count should be written in pascalCase to be in-line with the existing parameter. Other than that, LGTM.

markaren commented 2 years ago

One more thing. You'd expect that a threadCount of 1 means "run on the main thread". That's not what happens here.

davidhjp01 commented 2 years ago

Thanks updated accordingly.