nreco / AhoCorasickDoubleArrayTrie

Very fast C# implementation of Aho Corasick algorithm based on Double Array Trie.
Apache License 2.0
45 stars 13 forks source link

Multi-threading issues? #9

Open KeithVinson opened 1 year ago

KeithVinson commented 1 year ago

Not an issue, but I am curious if you are aware of any issue that might arise from having multiple threads using a pre built tree to search multiple text strings simultaneously?

Thanks for your insight.

VitaliyMF commented 1 year ago

You should be able to use the same AhoCorasickDoubleArrayTrie instance from multiple threads, as shared state is modified only in the constructor (Build method).

KeithVinson commented 1 year ago

Excellent, Thank you for your quick reply. Yes, from a quick scan of the code that is what I thought too.

Keith Vinson CTO Image Access, Inc. 543 NW 77th Street, Boca Raton, FL 33487 Tel: 561-886-2951 Fax: 561-431-2766 @.**@.>

@.*** DLSG is a Division of Image Access, Inc. www.ImageAccess.comhttp://www.imageaccess.com/ / www.DLSG.comhttp://www.dlsg.com/

DLSG is the Most Trusted Name in Digitization for Universities ▪ 49 of the top 50 universities are DLSG customers ▪ DLSG products serve over 70% of students at US universities

@.***https://www.facebook.com/pages/Image-Access-Inc/374428352765764Visit us on Facebook to see what people are posting about KIC!

From: Vitaliy Fedorchenko @.> Sent: Wednesday, November 16, 2022 1:52 AM To: nreco/AhoCorasickDoubleArrayTrie @.> Cc: Keith Vinson @.>; Author @.> Subject: Re: [nreco/AhoCorasickDoubleArrayTrie] Multi-threading issues? (Issue #9)

You should be able to use the same AhoCorasickDoubleArrayTrie instance from multiple threads, as shared state is modified only in the constructor (Build method).

— Reply to this email directly, view it on GitHubhttps://github.com/nreco/AhoCorasickDoubleArrayTrie/issues/9#issuecomment-1316536085, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKVJS5MNFPPFJ7WNOWD2S4DWISHA7ANCNFSM6AAAAAASBLTIHQ. You are receiving this because you authored the thread.Message ID: @.**@.>>