[issue21367] multiprocessing.JoinableQueue requires new kwarg

Dan O'Reilly report at bugs.python.org
Thu Jul 24 20:49:24 CEST 2014


Dan O'Reilly added the comment:

How are you importing JoinableQueue? You'll see this error if you import it from multiprocessing.queues instead of directly from multiprocessing. This is because multiprocessing.JoinableQueue is now a function:


    def JoinableQueue(self, maxsize=0):
        '''Returns a queue object'''
        from .queues import JoinableQueue
        return JoinableQueue(maxsize, ctx=self.get_context())

It provides the required context argument for you. Make sure your application is doing "from multiprocessing import JoinableQueue", rather than "from multiprocessing.queues import JoinableQueue".

----------
nosy: +dan.oreilly

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21367>
_______________________________________


More information about the Python-bugs-list mailing list