Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Hunspell thread safe?

Is the Hunspell spelling library thread-safe?

like image 560
Amit Bens Avatar asked Jan 09 '11 14:01

Amit Bens


1 Answers

The answer is NO, A simple multi-threaded test application revealed that Hunspell uses per-instance resources for the spelling process, so only one thread can use it at any time - use locks/work queue/or instanciate a per-thread Hunspell instance.

like image 119
Amit Bens Avatar answered Nov 08 '22 01:11

Amit Bens