sashafrey / topicmod

This project had been moved to https://github.com/bigartm/bigartm
Other
0 stars 0 forks source link

Configure 1ms sleeps across the code #30

Closed sashafrey closed 10 years ago

sashafrey commented 10 years ago

Search for this code: boost::this_thread::sleep(boost::posix_time::milliseconds(1)); It is happens in many places. Everywhere 1ms should be configurable via config object. Keep 1ms as a default value.

sashafrey commented 10 years ago

Also, think of including boost::this_thread::interruption_point() where necessary.

sashafrey commented 10 years ago

Fixed by https://github.com/sashafrey/topicmod/commit/a83df50201a7b51f63a64081e82353eaf1399f5f. I din't think that boost::this_thread::interruption_point() are necessary because we are no longer using this mechanism to stop threads. Instead we use std::atomic isstopping variable in and normally return from all ThreadFunction().