Skip to content

[bugfix] Prevent memory-leak in request scopes (#6)

Latest
Compare
Choose a tag to compare
@signalpillar signalpillar released this 20 Oct 13:59
8cd4bd7

Problem

corolocal.local keeps references to all the coroutines (green threads) and the
resources allocated in the scope for that thread. It prevents GC collecting used
injectables.

Solution

Manually clean scope storage in the end of each
request (NamekoInjectorProvider.worker_teardown)