Python 3 port: provide context to SimpleQueue when required
The multiprocessing library in Python 3 has some differences from the
one in Python 2. One of those, is the requirement of a context for a
SimpleQueue.
Since we're going to use that specific interface (get_context()),
let's check for it, and use it to get a context if it exists.
PS: This approach for checking the interface avoids having an external
library like `six` imported here just for the reason of checking the
Python version.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
Showing
想要评论请 注册 或 登录