thread.local does not work with yielding code

Bug #1364181 reported by Angus Salkeld
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
osprofiler
Confirmed
High
Unassigned

Bug Description

Heat uses yield to explicitly give up control and do other processing see:
https://github.com/openstack/heat/blob/master/heat/engine/scheduler.py
https://github.com/openstack/heat/blob/master/heat/engine/stack.py#L572

This is quite similar to how tulip/asyncio works.

What would be awesome is an api where we can control the switching of the thread.local.

This could be a start for ideas:
https://github.com/vkryachko/tasklocals/blob/master/tasklocals/__init__.py

So when you call: https://github.com/stackforge/osprofiler/blob/master/osprofiler/profiler.py#L33
we could provide a "different" thread.local wrapper.

Changed in osprofiler:
status: New → Confirmed
importance: Undecided → Medium
importance: Medium → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.