This needs to be multithreaded to have any sort of realistic expectation of performance, due to issues with syncronous I/O.