Commit 3b08af41 authored by Zekun Li's avatar Zekun Li Committed by Facebook Github Bot

use weak ref for event loop to avoid leaking it

Summary: This dict holds strong reference to all the loops and leads to leak if new loop is created and used, change it to weakref to avoid it.

Reviewed By: yfeldblum

Differential Revision: D6892775

fbshipit-source-id: a628a3743876ef0580acce5fb9f283da573cf459
parent d81cde8f
......@@ -3,9 +3,10 @@ from folly cimport cFollyExecutor
from folly.executor cimport cNotificationQueueExecutor
from libcpp.memory cimport make_unique, unique_ptr
from cython.operator cimport dereference as deref
from weakref import WeakKeyDictionary
#asynico Loops to NotificationQueueExecutor
loop_to_q = {}
loop_to_q = WeakKeyDictionary()
cdef class NotificationQueueExecutor:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment