1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-07-30 14:43:05 +03:00

Use new PriorityQueue interface

Summary:
Migrating mvfst priority API to be abstract, based on new classes is quic/priority.  For now, it requires applications use `HTTPPriorityQueue::Priority`, to be compatible with the hardcoded `deprecated::PriorityQueue` implementation and apps cannot yet change the queue impl.  Eventually the application will have full control of the queue.

There are minor functional changes in this diff:

1. Priority QLog types changed from int/bool to string
2. Any PAUSED stream has priority `u=7,i` if paused streams are disabled (previously explicitly settable to any priority)

Reviewed By: jbeshay

Differential Revision: D68696110

fbshipit-source-id: 5a4721b08248ac75d725f51b5cb3e5d5de206d86
This commit is contained in:
Alan Frindell
2025-04-09 13:54:27 -07:00
committed by Facebook GitHub Bot
parent a231536f6c
commit 444a0f261b
43 changed files with 258 additions and 159 deletions

View File

@ -436,14 +436,14 @@ StreamId StreamFrameScheduler::writeStreamsHelper(
void StreamFrameScheduler::writeStreamsHelper(
PacketBuilderInterface& builder,
PriorityQueue& writableStreams,
deprecated::PriorityQueue& writableStreams,
uint64_t& connWritableBytes,
bool streamPerPacket) {
// Fill a packet with non-control stream data, in priority order
for (size_t index = 0; index < writableStreams.levels.size() &&
builder.remainingSpaceInPkt() > 0;
index++) {
PriorityQueue::Level& level = writableStreams.levels[index];
deprecated::PriorityQueue::Level& level = writableStreams.levels[index];
if (level.empty()) {
// No data here, keep going
continue;