For example, your handler can block on a mutex until it's complete. That will cause it to process callbacks in order. Just be careful, this type of programming requires a pretty good understanding of parallelism. Code under mutex must have a no-reentrance guarantee or you will most likely deadlock yourself. It's very hard to provide that guarantee except for noting visually that there is a direct path through the critical section.