1. A method of recognizing specified groups of patterns in a data stream, the method comprising: identifying a multi-pattern rule for each group of said specified groups of patterns; using a first array of finite state machines, in a first, pattern scanner stage, to scan the data stream for at least some of the patterns in the specified groups; for each of the patterns in the specified groups of patterns that are found in the data stream by the first array of finite state machines, sending a pattern identifier identifying said each pattern to a second array of finite state machines, in a second, rule processor stage; using the second array of finite state machines for determining if any of the specified groups of patterns is in the data stream in accordance with the identified multi-pattern rule, including running a multitude of threads on the second array of finite state machines, each of the threads having a thread ID identifying said each thread, and using said multitude of threads to determine whether any of the of specified groups of patterns is in the data stream; and wherein: the sending a pattern identifier identifying said each pattern includes including in said pattern identifier one of the thread IDs identifying one of said threads; and the using said multitude of threads includes using said identified one of the threads to determine if said each pattern is part of one of the specified groups of patterns.