vlovich/hidapi — comment on commit df439ca883c6fbd8488d6e5fa6a2467703ef5d9c
File:  line 0
By signal11:

When you say the latency was too big with 0, what does that mean? Do you mean that it won't run _any_ events if you pass in 0?

Do you think something like this would work instead?

```
static void process_pending_events() {
SInt32 res;
do {
res = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.000, TRUE/*return after source handled*/);
} while(res == kCFRunLoopRunHandledSource);
}
```

Return after Source Handled is set to true, meaning it will return after one source has been processed. Passing in 0.0 for the timeout according to the doc means that one pass will be made through the event loop and then our predicate in the while loop runs as long as a source was handled (ie: as long as there was an event to be processed).

I'm looking at the doc here:
http://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CFRunLoopRef/Reference/reference.html

I'd like to be able to not have the mandatory 1ms delay. The Apple documentation is so unclear on so many things, so my above code might not work for some reason that I don't understand. Let me know what you think.

Alan.