writer.canWrite
如果下一次写入可能被接受(缓冲数据未满),则返回 true;如果正在施加背压,则返回 false;如果写入器已关闭或消费者已断开,则返回 null。
🌐 Returns true if the next write is likely to be accepted (buffered data is
below capacity), false if backpressure is active, or null if the writer
is closed or the consumer has disconnected.
这只是一个提示,不是保证:状态可能在检查和写入之间改变。使用 ondrain() 来等待容量,而不是轮询。
🌐 This is a hint, not a guarantee: the state can change between the check and
the write. Use ondrain() to wait for capacity rather than polling.