| 170 | return s->enc; |
| 171 | } |
| 172 | void flush(StreamImpl* s) { |
| 173 | if (!s->cb) return; |
| 174 | end_encoder(s); |
| 175 | s->cb->encodeSignalEvent(s->tl, ++s->submitted); |
| 176 | s->cb->commit(); |
| 177 | s->cb->release(); |
| 178 | s->cb = nullptr; |
| 179 | s->pending = 0; |
| 180 | } |
| 181 | Error wait_value(MTL::SharedEvent* ev, uint64_t v) { |
| 182 | while (ev->signaledValue() < v) std::this_thread::yield(); |
| 183 | ++rt().stats.host_syncs; |
no test coverage detected