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

This commit is contained in:
Daniel Folkinshteyn 2010-08-08 01:46:05 -04:00
parent 2d9f61e66c
commit 4ea3761b4b

View File

@ -102,7 +102,7 @@ class String(callbacks.Plugin):
'it with some smaller inputs.')
else:
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):
"""<string> [<length>]