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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:51:04+00:00 2026-05-11T13:51:04+00:00

I dont understand why Threads have to sleep if there is no event in

  • 0

I dont understand why Threads have to ‘sleep’ if there is no event in the Application Run Loop. Does this save energy, or memory, or what else?

When there comes in an event from an source input, then it would wake up that Thread again to handle this event. After that, it would sleep again, for the case that there is no more event in the queue waiting to be processed.

Does someone have a good explanation for this sleeping issue?

  • 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. 2026-05-11T13:51:04+00:00Added an answer on May 11, 2026 at 1:51 pm

    It’s not an issue. It’s a good thing. What else would the main thread be doing? It shouldn’t be processing long-running tasks – that would reduce the ‘snappiness’ of the UI when a UI event comes in.

    It shouldn’t be tight-looping until an event comes in – that would take up processor time which can otherwise be sensibly used by other applications.

    Sleeping (or rather waiting) is exactly what you want it to do – so it can wake up as soon as it has useful work to do, but otherwise doesn’t impact the system.

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

Sidebar

Related Questions

There is something I dont understand in core data. I have created a NSManagedDocument,
i dont quite understand this pattern. from what i have read, it looks like
according to this code i dont understand about NSClassFromString how did i know viewControllerName
I dont really understand why this is not working, I am being returned to
Im using Doctrine and i dont quite understand this code here: $this->hasColumn('id', 'integer', 8,
I didn't fully understand the concept of threads I have some questions. Assume we
Background: In my application written in C++, I have created 3 threads: AnalysisThread (or
I have found a few threads in regards to this issue. Most people appear
i dont understand the problem with returning multiple rows: here is my table BBC:
I dont understand what would be the problem with the following code. It needs

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.