This is not thread safe and can still block if two programs refering to the same socket try to read data at the same time