File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -324,10 +324,11 @@ kj::Own<kj::PromiseFulfiller<void>> OutputGate::lock() {
324324 return kj::mv (paf.fulfiller );
325325}
326326
327- kj::Promise<void > OutputGate::wait () {
327+ kj::Promise<void > OutputGate::wait (SpanParent parentSpan ) {
328328 hooks.outputGateWaiterAdded ();
329+ SpanBuilder waitSpan = parentSpan.newChild (" output_gate_lock_wait" _kjc);
329330 return pastLocksPromise.addBranch ().attach (
330- kj::defer ([this ]() { hooks.outputGateWaiterRemoved (); }));
331+ kj::defer ([this ]() { hooks.outputGateWaiterRemoved (); }), kj::mv (waitSpan) );
331332}
332333
333334kj::Promise<void > OutputGate::onBroken () {
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ class OutputGate {
275275
276276 // Wait until all preceding locks are released. The wait will not be affected by any future
277277 // call to `lockWhile()`.
278- kj::Promise<void > wait ();
278+ kj::Promise<void > wait (SpanParent parentSpan = nullptr );
279279
280280 // Rejects if and when calls to `wait()` become broken due to a failed lockWhile(). The actor
281281 // should be shut down in this case. This promise never resolves, only rejects.
You can’t perform that action at this time.
0 commit comments