The read and write locks are subject to deadlock, such as here.https://github.com/staticfloat/SimpleBufferStream.jl/blob/e592419f6f0aee954a02bcde6ecf2b468d3c016c/src/BufferStream.jl#L108
Normally, the usual solution is to use the same lock for both the Condition objects when allocated.