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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:10:30+00:00 2026-05-27T07:10:30+00:00

I am comparing a task queue/thread pool pattern system to an n -threads system

  • 0

I am comparing a task queue/thread pool pattern system to an n-threads system in D. I’m really new to the D programming language but have worked with threads in C, Java, and Python before. I’m using the Tango library, and I’m building a webserver as an example.

I decided to use tango.core.ThreadPool as my thread pool, as my project is focused on ease of use and performance between traditional threading and task queues.

The documentation shows that I have 3 options:

  1. ThreadPool.wait() – Blocks the current thread while the pool consumes tasks from the queue.
  2. ThreadPool.shutdown() – Finishes the tasks in the pool but not the ones in the queue.
  3. ThreadPool.finish() – Finishes all tasks in the pool and queue, but then accept no more.

None of these things are what I want. It is my understanding that your list of tasks should be able to grow in these systems. The web server is very simple and naïve; I just want it to try its best at scaling to many concurrent requests, even if its resource management only consists of consuming things in the task queue as quickly as possible.

I suspect that it’s because the main thread needs to join the other threads, but I’m a bit rusty on my threading knowledge.

  • 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-27T07:10:31+00:00Added an answer on May 27, 2026 at 7:10 am

    I discovered that the way I was constructing my delegate contributed to blocking in some part of the code. Instead of closing over the object returned by SocketServer.accept, I now pass that object as a parameter to my delegate. I don’t know why this was the solution, but the program now works as expected. I heard that closures in D version 1 are broken; maybe this has something to do with it.

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

Sidebar

Related Questions

I'm pretty new to java and really enjoying learning about it. I have made
When comparing two objects (of the same type), it makes sense to have a
I'm not a Natural Language Programming student, yet I know it's not trivial strcmp(n1,n2).
Hi and thanks for looking! Background I have a computing task that requires either
I'm working on an application in ASP.NET 2.0, and i have given a task
I've been reading about the new async await keyword and it sounds awesome, but
I have a task to complete for work. I have a HTML page with
I have an ant task that contains javac task inside. It reports about error
Comparing string in C# is pretty simple. In fact there are several ways to
Comparing LinkedLists and Arrays while also comparing their differences with sorted and unsorted data

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.