diff options
author | Martin Lucina <martin@lucina.net> | 2012-01-23 08:53:29 +0100 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-01-23 08:53:29 +0100 |
commit | 2c416a793ea781273a5da6742211f5f01af13a2b (patch) | |
tree | b8ede23ec38d4aab9595a517b4b9894df40c2cae /src/app_thread.cpp | |
parent | 5ba1cb20fe6f6699cef1cc726718e760cd4c9af1 (diff) |
Imported Upstream version 2.0.10upstream/2.0.10
Diffstat (limited to 'src/app_thread.cpp')
-rw-r--r-- | src/app_thread.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/app_thread.cpp b/src/app_thread.cpp index ac59464..fc9bc1f 100644 --- a/src/app_thread.cpp +++ b/src/app_thread.cpp @@ -111,9 +111,11 @@ bool zmq::app_thread_t::process_commands (bool block_, bool throttle_) #error #endif - // Check whether certain time have elapsed since last command - // processing. - if (current_time - last_processing_time <= max_command_delay) + // Check whether TSC haven't jumped backwards (in case of migration + // between CPU cores) and whether certain time have elapsed since + // last command processing. If it didn't do nothing. + if (current_time >= last_processing_time && + current_time - last_processing_time <= max_command_delay) return !terminated; last_processing_time = current_time; } |