Is the Hunspell spelling library thread-safe?
Is Hunspell thread safe?
Asked Answered
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.
You might the following article useful: Spell Check, Hyphenation, and Thesaurus for .NET with C# and VB Samples - Part 2: Multi Threading. –
Wicopy
And use the latest NHunspell versions from sourceforge, because there are som multithreading bugs in the older versions. –
Cathrinecathryn
The current comments for this answer refer to NHunspell, where as the question refers to Hunspell. The different HunSpell implementations have different owners and vary in their implementation. –
Impersonality
© 2022 - 2024 — McMap. All rights reserved.