Try to throttle using a critical section.
authorIain Patterson <me@iain.cx>
Tue, 12 Nov 2013 12:31:22 +0000 (12:31 +0000)
committerIain Patterson <me@iain.cx>
Tue, 12 Nov 2013 12:49:53 +0000 (12:49 +0000)
commit4550eb2281a16b698c6a68d8de3552fe13807590
tree9ed58efc58cfad3fc69ca5a78add9e151dfdf222
parente42e6900a5dad50b952d92c57344fdea2e13646e
Try to throttle using a critical section.

The first implementation of service restart throttling used a condition
variable in a critical section to sleep for the required amount of time.
The implementation was changed to use a waitable timer because Windows
2000 does not support SleepConditionVariableCS() or
WakeConditionVariable().

Since we are now using LoadLibrary() and GetProcAddress() to use newer
functions dynamically without having to build OS-specific binaries, we
can now use a critical section where it's supported and fall back to a
waitable timer when running on Windows 2000.
imports.cpp
imports.h
service.cpp