4 ms·
I use CreateEvent/SetEvent/WaitForSingleObject in almost the same exact way you describe/desire. Producer/consumer type pattern, all in software. I have one or
by stagger87 6y ago
I use CreateEvent/SetEvent/WaitForSingleObject in almost the same exact way you describe/desire. Producer/consumer type pattern, all in software. I have one or more threads waiting to process data, and they use the WaitForSingleObject function to wait for the producer to set the event. I have tested this and found I can effectively send > 100k events/"wakeups" per second through this mechanism. I tested this by having two threads sequentially wake each other up in ping-pong fashion. I use this to process data coming in off SDRs, usually at rates > 30MS/s. This code runs on 10's of thousands of PCs, I would have heard about issues by now if these worked at 1ms or greater resolution.