String: make levenshtein command threaded, since it can take a nontrivial amount of time with longer inputs.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
Daniel Folkinshteyn 2010-08-08 01:46:05 -04:00 committed by James McCoy
parent 34e5aedc45
commit 92be7c255f

View File

@ -105,7 +105,7 @@ class String(callbacks.Plugin):
'it with some smaller inputs.') 'it with some smaller inputs.')
else: else:
irc.reply(str(utils.str.distance(s1, s2))) irc.reply(str(utils.str.distance(s1, s2)))
levenshtein = wrap(levenshtein, ['something', 'text']) levenshtein = thread(wrap(levenshtein, ['something', 'text']))
def soundex(self, irc, msg, args, text, length): def soundex(self, irc, msg, args, text, length):
"""<string> [<length>] """<string> [<length>]