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 8153273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:57:50+00:00 2026-06-06T15:57:50+00:00

I use a thread pool and and I submit some tasks to be proccessed.

  • 0

I use a thread pool and and I submit some tasks to be proccessed.

Sometimes a server that I ping or my internet connection could be down. This can be determined by any of the running threads.

In that case I would like the thread that detected the error to notify the others to pause
their execution until the error is fixed.

Do you know how is this possible?

I add to the above. The ideal solution would be :
when a threads detects the program to send a message to all other threads to wait.
Also it should notify an external server and after receiving that everything is ok from the
server to send again a signal to the other threads to continue the work.

  • 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-06T15:57:52+00:00Added an answer on June 6, 2026 at 3:57 pm

    I found it using threading.Event

    I just have an event

    event = Event()
    

    and I use the

    event.wait()
    

    In the beggining I

    event.set()
    

    when a thread detects an error it

    event.clear()
    

    and the threads are waiting until

    event.set()
    

    This seems to work

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a thread pool and I use a library that if certain conditions
I'm trying to use thread pool in Java. But the number of threads is
In ASP.NET we use async methods because the Thread Pool has limited slots, and
I have some code where I use a thread static object in C#. [ThreadStatic]
I need to use a thread pool in python, and I want to be
What is the use of a Thread pool? Is there a good real world
When using a thread pool, is it beneficial to still use singular thread objects
Conventional wisdom tells us that high-volume enterprise java applications should use thread pooling in
In short - tomcat uses a thread pool, so threads are reused. Some libraries
I have a fixed thread pool that runs 7 concurrent threads at any time

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.