Correctly use number of processing threads for realtime query execution

Fixes #126