You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this across 2 scripts; as in one queue with 2 scripts, one for input and one for processing.
I seem to be struggling to get them to work together.
I've been battling with threading for the past few days; it's tricky on my server and while fast, it's been problematic.
I implemented my script with asyncio this morning and while it's a nearer implementation it was slow in comparison (It's my first play with the lib so I'm sure there are ways to speed it up...)
I was then going to write a file type queue system (you beat me to it) and with a little playing around, I've figured out that I can create a new instance for each time I push or pop.
So, I've split my code down to 3 files, one adding to my queue and then two reading - I've been testing this over the past hour and I'm not seeing any duplication issues as of yet. Happy days 👍
Activity
graingerkid commentedon Mar 4, 2018
Think I figured it out - it was because I had an instance I was reusing rather than creating a new instance for each check.
graingerkid commentedon Mar 4, 2018
Me again!
Just wanted to say thank you!
I've been battling with threading for the past few days; it's tricky on my server and while fast, it's been problematic.
I implemented my script with asyncio this morning and while it's a nearer implementation it was slow in comparison (It's my first play with the lib so I'm sure there are ways to speed it up...)
I was then going to write a file type queue system (you beat me to it) and with a little playing around, I've figured out that I can create a new instance for each time I
pushorpop.So, I've split my code down to 3 files, one adding to my queue and then two reading - I've been testing this over the past hour and I'm not seeing any duplication issues as of yet. Happy days 👍