I have an application that needs to have code executed at very precise intervals. For that purpose I also need Windows' scheduler resolution increased to 1ms via timeBeginPeriod
.
To do that, I have a native C++ dll that handles all the time critical things via callbacks that get raised from a TimerQueueTimer
at an interval of 1ms (all native code).
The application itself is a .NET application (C#, so pure CLR). The native dll uses buffering, so the C# code itself does not need to be time critical as long as it gets some execution time every 50 ms or so.
When the garbage collector strikes, would that also halt or delay the execution of any timer callbacks in my program? (In other words: Does the non-deterministicness of a .NET program even spread to native code fragments used by it?) I haven't found an answer to this precise question. A link to the MSDN documentation would be most reassuring.
I'm using .NET 4.0