Started to do multithreading, but was using fundamentally incorrect