trinity.buffer.writer.queue_writer module
Writer of the Queue buffer.
-
class trinity.buffer.writer.queue_writer.QueueWriter(config: StorageConfig)[源代码]
基类:BufferWriter
Writer of the Queue buffer.
-
__init__(config: StorageConfig)[源代码]
-
write(data: List) → None[源代码]
Write to buffer.
-
async write_async(data)[源代码]
Write to buffer asynchronously.
-
async acquire() → int[源代码]
Acquire the buffer writer.
- 返回:
The reference count of the buffer after acquiring.
- 返回类型:
int
-
async release() → int[源代码]
Release the buffer writer. After release, the buffer writer can not be used again.
- 返回:
The reference count of the buffer after releasing.
- 返回类型:
int