don't allow thread-interleaved reads/writes on websockets