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

  • SEARCH
  • Home
  • 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 7875837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:04:05+00:00 2026-06-03T03:04:05+00:00

Currently I’m trying to convert my little python script to support multiple threads/cores. I’ve

  • 0

Currently I’m trying to convert my little python script to support multiple threads/cores. I’ve been reading about the multiprocessing module for several days now and I’ve also been trying to get it to suit my needs for some time, still I don’t have a clue why it won’t work.

This is the working code, and this is my approach on implementing the pool workers. As there are no locks in place and I didn’t want to make it too complicated at first I already disabled the logging to file.

Still it doesn’t work. It doesn’t even output any kind of error message. After running it it just displays the welcome message and then it just keeps running, but without outputting any of the desired output, which would be 2 lines per converted file (before + after converting).

  • 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-06-03T03:04:06+00:00Added an answer on June 3, 2026 at 3:04 am

    all your workers do is wait for started subprocesses to finish. they don’t have any real work to do as that is performed by the external subprocesses, so they will be idle all the time.
    using multiprocessing for what you do really is overkill, it’s much more appropriate to use threads for that.

    if you want to learn how to do multiprocessing, try something which involves inter-process communication, synchronisation, pipes, …

    but to also address your question:
    hava a look at what arguments subprocess.call takes. you call it with a single space-separated command string. if you want that to work you have to pass shell=True, otherwise the whole string is interpreted as the executable’s name.
    the preferred way to call a program using subprocess is is to specify program and arguments as a list:

    subprocess.Popen(['/path/to/program', 'arg1', 'arg2'], *otherarguments)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm trying to write my first Python library and I've encountered the following
Currently I'm learning C++ and I've been trying to create a simple image processing
Currently I am reading the book: Lions_Commentary_on_UNIX_6th_Edition, together I am trying to understand the
Currently, I have: <html> <div class=yes1><span><img src=img></span></div> </html> <script> var x = ='yes1' var
currently I'm developing an app for WP7 but came across a little problem with
Currently I am trying to implement a timer class in VBA. For that purpose
Currently I’m trying to get the hang of a block copy with my current
Currently, if I want to output a SQL script for a table in my
Currently trying to set up and deploy a Sencha Touch 2 application. I'm following
Currently my application uses SpringMVC for all of my controller mappings. I'm trying to

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.