Is Hunspell thread safe?
Asked Answered
M

1

9

Is the Hunspell spelling library thread-safe?

Madagascar answered 9/1, 2011 at 14:49 Comment(0)
M
8

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.

Madagascar answered 9/1, 2011 at 14:51 Comment(3)
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.