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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:08:49+00:00 2026-05-22T19:08:49+00:00

I have a singleton that I use for creating an application wide report. As

  • 0

I have a singleton that I use for creating an application wide report. As data is passed to the singleton by the application the singleton then formats the data for use in the report. I use Grand Central Dispatch so that the report creation is not on the main thread.

My question is, would it be bad practise to create a Grand Central Dispatch queue when the singleton is initialised that is then only used by the singleton. I’d like a single thread to be associated with the singleton because if I don’t some parts of the report are prone to get out of sync breaking the formatting of the report. If this is bad practise then what other pattern would be suitable for this problem but giving me quick and easy to use code.

  • 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-22T19:08:50+00:00Added an answer on May 22, 2026 at 7:08 pm

    Your approach is the right one. Serial dispatch queues are meant for synchronizing access to a particular resource. They process requests FIFO which makes them suitable for your requirement. I don’t think the singleton part figures as much here.

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

Sidebar

Related Questions

I have a C# singleton class that multiple classes use. Is access through Instance
I have just re-implemented an ASP.NET web application that uses NHibernate to use a
I have a server application (singleton, simple .NET console application) that talks to a
I have an object, based on the Singleton design, that I use for user
I have a singleton here that I am trying to use the same instance
I have an application in java that uses two different threads.And for sharing data
I have a singleton that uses the static readonly T Instance = new T();
I have a co-worker that swears by //in a singleton Constants class public static
we have designed a multi threaded server that use linq to sql at each
I have a lookup table (LUT) of thousands integers that I use on a

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.