Commit 7d506179 authored by Martin Sustrik's avatar Martin Sustrik

Merge branch 'maint'

* maint:
  if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed

Conflicts:
	src/app_thread.cpp
parents e478468e 9129b792
...@@ -647,9 +647,11 @@ int zmq::socket_base_t::process_commands (bool block_, bool throttle_) ...@@ -647,9 +647,11 @@ int zmq::socket_base_t::process_commands (bool block_, bool throttle_)
#else #else
#error #error
#endif #endif
// Check whether certain time have elapsed since last command // Check whether TSC haven't jumped backwards (in case of migration
// processing. If it didn't do nothing. // between CPU cores) and whether certain time have elapsed since
if (current_time - last_processing_time <= max_command_delay) // last command processing. If it didn't do nothing.
if (current_time >= last_processing_time &&
current_time - last_processing_time <= max_command_delay)
return 0; return 0;
last_processing_time = current_time; last_processing_time = current_time;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment