Drop optimization check, binance made its point

tokio_backup
Tyler Goodlet 2021-08-10 19:09:34 -04:00
parent b9863fc4ab
commit db2f3f787a
1 changed files with 0 additions and 6 deletions

View File

@ -145,13 +145,7 @@ class BroadcastReceiver(ReceiveChannel):
# value, so queue sched it on the internal event. # value, so queue sched it on the internal event.
else: else:
await state.sender_ready.wait() await state.sender_ready.wait()
# TODO: optimization: if this is always true can't we just
# skip iterating these sequence numbers on the fastest
# task's wakeup and always read from state.queue[0]?
seq = state.subs[key] seq = state.subs[key]
assert seq == 0, 'Internal error?'
state.subs[key] -= 1 state.subs[key] -= 1
return state.queue[seq] return state.queue[seq]