Python Forum
Intermittent errors using Queue()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intermittent errors using Queue()
#3
Hello

Thanks for trying to help.

Reproducing:
It might be the platform or the Python version ?
I run Python 3.5 on Win 10 64-bit.
IDE is PyCharm (latest version)

join():
No difference if I call join() on it before exit(0). Still same error.
Calling shutdown() on the manager doesn't help either.

queue.Queue():
I thought I had to use the proxied queues to communicate between multiple processes safely.
I haven't be able to find any info on why there are three implementations of queues (multiprocessing.Queue, queue.Queue and Manager.Queue()).
I figured the use of proxied queue was best practice since it is usable over networks and between different interpreters on the same machine.

Cheers

queue.Queue():
queue.Queue() is not a drop-in replacement, I get a pickle error.
multiprocessing.Queue() is a drop-in replacement tho and can handle the message object I'm sending. It also doesn't give the weakref.py error message.

This solution works for this project but still doesn't help with future projects where I might need to rely on proxying queues over networks.
Reply


Messages In This Thread
Intermittent errors using Queue() - by Fredrik - Aug-16-2017, 06:42 PM
RE: Intermittent errors using Queue() - by nilamo - Aug-16-2017, 07:01 PM
RE: Intermittent errors using Queue() - by Fredrik - Aug-16-2017, 08:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  task queue Valon1981 8 5,073 Jul-07-2020, 07:41 AM
Last Post: freeman
  Queue in Pygame constantin01 1 4,571 Jan-07-2020, 04:02 PM
Last Post: metulburr
  Queue maxsize mr_byte31 2 5,785 Sep-03-2019, 07:02 PM
Last Post: mr_byte31
  Queue.Queue() would not reduce capacity after get() yuan8421 9 14,036 Jan-02-2018, 09:38 PM
Last Post: Windspar
  Threading and Queue nexusfactor 5 5,543 Oct-16-2017, 04:14 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020