From a12b1fc6311a422d7f0600fda720c4ced169e286 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 10 Aug 2021 19:09:34 -0400 Subject: [PATCH] Drop optimization check, binance made its point --- tractor/_broadcast.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tractor/_broadcast.py b/tractor/_broadcast.py index 984aae9..7d56430 100644 --- a/tractor/_broadcast.py +++ b/tractor/_broadcast.py @@ -145,13 +145,7 @@ class BroadcastReceiver(ReceiveChannel): # value, so queue sched it on the internal event. else: 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] - assert seq == 0, 'Internal error?' - state.subs[key] -= 1 return state.queue[seq]