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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:24:33+00:00 2026-06-12T14:24:33+00:00

For example, if a project need a log system, instead of direct writing log

  • 0

For example, if a project need a log system, instead of direct writing log file or wrap the log file in a monitor object, we could start a dedicated log-thread which is the only thread that will log.

If the other threads want to write a log, it send a message to this dedicated thread. Then, the log-thread could sequentially write the log from its message queue to the log file.

I think this is a better design than the multithreaded-one in which each routine writing log should use some kind of synchronization scheme.

So am I right? Could you provide more methods/examples to turn a multithreading problem to a simple single-thread problem?

  • 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-12T14:24:34+00:00Added an answer on June 12, 2026 at 2:24 pm

    I think this is a better design than the multithreaded-one in which each routine writing log should use some kind of synchronization scheme.

    In a design where a dedicated thread is the only one writing to the log you must use synchronization too, except that instead of synchronizing access to the log you need to synchronize access to the producer-consumer queue of the thread that writes to the log.

    Could you provide more methods/examples to turn a multithreading problem to a simple single-thread problem?

    The problem by no means has become simpler: the need of synchronization did not go away, only got moved from one place to the other.

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

Sidebar

Related Questions

Could someone guide me trough example or an URL to achieve my need. Project
I need to have : http://www.example.com/v1/my-project/ redirected to http://example.com/my-project/ so : (1) remove the
I need to implement Online Help in my Java Web Project. For Example User
In my project I need to log all queries executed against my database. As
I'm working on a project in which remote clients need to log in to
I'm using this example project's XNA 4.0 form control in an application I'm writing:
I am writing an Android app and I need to download a csv file
I'm a iOS Application developer.I need some similar tasks in many projects as example
in this example http://sorgalla.com/projects/jcarousel/examples/static_controls.html i need an active state on li so it should
i'm download DrillDownApp example project from iPhoneSDKArticles i have a problem when i'm try

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.