Can the CLI be use in threaded applications?
The short answer to this question is Yes, meaning that the CLI code is thread safe, and you do not have to worry about putting synchronization points in your own code. The CLI implementation has its own mutexing logic to ensure that processing is effectively single-threaded at points in which its needed. However, this is not to say that multiple threads will be able to simultaneously process SQL requests using the CLI. The only way to get any true multi-threading of SQL requests is to use CLI Server Mode.