| 192 | } |
| 193 | |
| 194 | void DestinationBuffer::maybeLoadData(ArbitraryBuffer* buffer) { |
| 195 | BOLT_CHECK(!buffer->empty() || buffer->hasNoMoreData()); |
| 196 | if (notify_ == nullptr) { |
| 197 | return; |
| 198 | } |
| 199 | if (aliveCheck_ != nullptr && !aliveCheck_()) { |
| 200 | // Skip load data to an inactive destination buffer. |
| 201 | clearNotify(); |
| 202 | return; |
| 203 | } |
| 204 | BOLT_CHECK_GT(notifyMaxBytes_, 0); |
| 205 | loadData(buffer, notifyMaxBytes_); |
| 206 | } |
| 207 | |
| 208 | void DestinationBuffer::loadData(ArbitraryBuffer* buffer, uint64_t maxBytes) { |
| 209 | auto pages = buffer->getPages(maxBytes); |