Closed allisterb closed 4 years ago
@allisterb the engine is internally protected by a mutex, so you can share it across threads and use it concurently without any problems
@fredszaq The underlying SnipsNluEngine
struct is Send + Sync
so I think we could get rid of this mutex (there are other mutexes at a lower level in the implementation).
This would improve concurrency.
Awesome, thanks a lot.
I want to use the native snips_nlu_ffi library binary in a multi-threaded app. Is it safe to share one engine pointer across many threads and call functions like
snips_nlu_engine_run_get_intents
concurrently?