Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3606122
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:12:34+00:00 2026-05-18T21:12:34+00:00

My program has 2 parts divided into the core and downloader. The core handles

  • 0

My program has 2 parts divided into the core and downloader. The core handles all the app logic while the downloader just downloads urls. Right now, I am trying to use the python multiprocessing module to accomplish the task of the core as a process and the downloader as a process.

The first problem I noticed was that if I spawn the downloader process from the core process so that the downloader is the child process and the core is the parent, the core process(parent) is blocked until the child is finished. I do not want this behaivor though. I would like to have a core process and a downloader process that are both able to execute their code and communicate between each other.

example

...
def main():
    jobQueue = Queue()
    jobQueue.put("http://google.com)
    d = Downloader(jobQueue)
    p = Process(target=d.start())
    p.start()

if __name__ == '__main__':
    freeze_support()
    main()

where Downloader’s start() just takes the url out of the queue and downloads it.

In order to have the 2 processes unblocked, would I need to create 2 processes from the parent process and then share something between them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:12:34+00:00Added an answer on May 18, 2026 at 9:12 pm

    On the p = Process(target=d.start()) line, you’re calling d.start(). Remove the parens, like below:

    ...
    def main():
        jobQueue = Queue()
        jobQueue.put("http://google.com")
        d = Downloader(jobQueue)
        p = Process(target=d.start)
        p.start()
    
    if __name__ == '__main__':
        freeze_support()
        main()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we have a classic asp web application which has divided into three parts and
My program has two threads: Main execution thread that handles user input and queues
If a program has literally just deserialized an object (doesn't really matter how, but
Having a program that has several distinct parts is usual.By part I mean a
Situation: My program has parts that are heavily location based, but do to speed
My program has to use certain files that reside in another directory. Right now
My program has one dialog and two sockets. Both sockets are derived from CAsyncSocket,
My program has the following class definition: public sealed class Subscriber { private subscription;
If my program has to return different values (e.g. 0, 1, 2, 3, etc)
The data model in my program has a number of discrete states, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.