mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-07-30 14:43:05 +03:00
Add SinglePacketInplaceBatchWriter
Summary: The new writer will use a single IOBuf for in-place writes via a accessor. Reviewed By: jbeshay, mjoras Differential Revision: D47648606 fbshipit-source-id: c6094eb3445587337f8a03e203aeadb2954f76b1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1216d25d47
commit
15a619fccf
@ -135,6 +135,13 @@ class ThreadLocalBatchWriterCache : public folly::AsyncTimeout {
|
||||
|
||||
namespace quic {
|
||||
|
||||
bool useSinglePacketInplaceBatchWriter(
|
||||
uint32_t maxBatchSize,
|
||||
quic::DataPathType dataPathType) {
|
||||
return maxBatchSize == 1 &&
|
||||
dataPathType == quic::DataPathType::ContinuousMemory;
|
||||
}
|
||||
|
||||
// BatchWriterDeleter
|
||||
void BatchWriterDeleter::operator()(BatchWriter* batchWriter) {
|
||||
#if USE_THREAD_LOCAL_BATCH_WRITER
|
||||
|
Reference in New Issue
Block a user