Skip to content
Snippets Groups Projects
Commit 629843de authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

close the scope upon creation

parent b1b0c988
No related branches found
No related tags found
No related merge requests found
__version__ = '2.18.10rc1'
__version__ = '2.18.10rc2'
......@@ -31,8 +31,10 @@ def parallel_construct(iterable: tp.Iterable[V],
current_span = tracer.active_span
def wrap_iterable(arg, *args, **kwargs):
tracer.scope_manager.activate(current_span, finish_on_close=False)
return function(arg, *args, **kwargs)
scope = tracer.scope_manager.activate(current_span, finish_on_close=False)
v = function(arg, *args, **kwargs)
scope.close()
return v
if wrap_iterable is None:
wrap_iterable = function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment