improve the write operation synchronization mechanism, use two streambufs instead of a queue of them