run the matrix operation in a thread so we avoid copying its data through a queue