Future direction: Non-copyable Span
#126
Labels
1 - triaged
Task makes sense, is well defined, and is ready to be worked on
Milestone
Given that
Span
should be ended exactly once, and should not be shared between subprocesses or preserved after termination, it seems a potential client of the recently accepted SE-0390. With Swift 5.9+ we can markSpan
as non-copyable, and only allow the operation to “borrow” the span.span.end()
will consume the span. We can also addspan.end()
indeinit
to automatically terminate the span.Note that this is unfortunately very breaking. Haven’t thought about if there’s a way to land this safely in the 1.x period.
The text was updated successfully, but these errors were encountered: