algebraicthunk.net/ blog/ entry/ Thread pattern recognition