|
These two functions both call nanosleep() internally.
If nanosleep fails, this is logged, but it's not very informational to diagnose where the problem is. Log example:
2014-09-16T18:18:26.503+0000 [initandlisten] connection accepted from 54.68.48.43:54328 #32 (24 connections now open)
|
nanosleep failed
|
2014-09-16T18:18:37.149+0000 [conn24] insert test.foo12 ninserted:1 keyUpdates:0 numYields:0 locks(micros) w:31 131ms
|
The following could be enhanced to include at least errno, and maybe a backtrace to understand where nanosleep failed. The latter coul be probably showed only at a different log severity, let's say >= 2.
if ( nanosleep( &t , &out ) ) {
|
std::cout << "nanosleep failed" << std::endl;
|
}
|
|