Buffer a write task during a transaction block. Returns `true` if buffered (in transaction), `false` if not (dispatch immediately).
(&self, addr: &SocketAddr, task: PhysicalTask)
| 133 | /// |
| 134 | /// Returns `true` if buffered (in transaction), `false` if not (dispatch immediately). |
| 135 | pub fn buffer_write(&self, addr: &SocketAddr, task: PhysicalTask) -> bool { |
| 136 | self.write_session(addr, |session| { |
| 137 | if session.tx_state == TransactionState::InBlock { |
| 138 | session.tx_buffer.push(task); |
| 139 | true |
| 140 | } else { |
| 141 | false |
| 142 | } |
| 143 | }) |
| 144 | .unwrap_or(false) |
| 145 | } |
| 146 | |
| 147 | /// ROLLBACK — discard the write buffer and return to idle. |
| 148 | /// Returns any pending GAP_FREE reservations that need to be rolled back. |
no test coverage detected