@@ -105,39 +105,37 @@ where
105105 ) -> Option < & ' db Memo < ' db , C > > {
106106 let database_key_index = self . database_key_index ( id) ;
107107 // Try to claim this query: if someone else has claimed it already, go back and start again.
108- let claim_guard = loop {
109- match self
110- . sync_table
111- . try_claim ( zalsa, zalsa_local, id, Reentrancy :: Allow )
112- {
113- ClaimResult :: Claimed ( guard) => break guard,
114- ClaimResult :: Running ( blocked_on) => {
115- if !blocked_on. block_on ( zalsa) {
116- continue ;
117- }
108+ let claim_guard = match self
109+ . sync_table
110+ . try_claim ( zalsa, zalsa_local, id, Reentrancy :: Allow )
111+ {
112+ ClaimResult :: Claimed ( guard) => guard,
113+ ClaimResult :: Running ( blocked_on) => {
114+ if !blocked_on. block_on ( zalsa) {
115+ return None ;
116+ }
118117
119- if C :: CYCLE_STRATEGY == CycleRecoveryStrategy :: FallbackImmediate {
120- let memo = self . get_memo_from_table_for ( zalsa, id, memo_ingredient_index) ;
118+ if C :: CYCLE_STRATEGY == CycleRecoveryStrategy :: FallbackImmediate {
119+ let memo = self . get_memo_from_table_for ( zalsa, id, memo_ingredient_index) ;
121120
122- if let Some ( memo) = memo {
123- if memo. value . is_some ( ) {
124- memo. block_on_heads ( zalsa) ;
125- }
121+ if let Some ( memo) = memo {
122+ if memo. value . is_some ( ) {
123+ memo. block_on_heads ( zalsa) ;
126124 }
127125 }
128-
129- return None ;
130- }
131- ClaimResult :: Cycle { .. } => {
132- return Some ( self . fetch_cold_cycle (
133- zalsa,
134- zalsa_local,
135- db,
136- id,
137- database_key_index,
138- memo_ingredient_index,
139- ) ) ;
140126 }
127+
128+ return None ;
129+ }
130+ ClaimResult :: Cycle { .. } => {
131+ return Some ( self . fetch_cold_cycle (
132+ zalsa,
133+ zalsa_local,
134+ db,
135+ id,
136+ database_key_index,
137+ memo_ingredient_index,
138+ ) ) ;
141139 }
142140 } ;
143141
0 commit comments