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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:44:43+00:00 2026-06-13T13:44:43+00:00

Currently, I’m running on a thread-less model that isn’t working simply because I’m running

  • 0

Currently, I’m running on a thread-less model that isn’t working simply because I’m running out of memory before I can process the data I’m being handed. I’ve made all the changes that I can to optimize the code, and it’s still just not quite quick enough.

Clearly I should move on to a threaded model. I’m wondering what the simplest, easiest way to do the following is:

  • The main thread passes some info to the worker
  • That worker performs some work that I’ll refactor out of the main method
  • The workers will disappear and new ones will be instantiated when needed

I’ve never worked with java threading and from what I’ve read up on it seems pretty complicated, even if what I’m looking for seems pretty simple.

  • 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-13T13:44:44+00:00Added an answer on June 13, 2026 at 1:44 pm

    If you have multiple independent units of work of equal priority, the best solution is generally some sort of work queue, where a limited number of threads (the number chosen to optimize performance) sit in a while(true) loop dequeuing work units from the queue and executing them.

    Generally the optimum number of threads is going to be the number of processors +/- 1, though in some cases a larger number will be optimal if the threads tend to get stalled by disk I/O requests or some such.

    But keep in mind that tuning the entire system may be required. Eg, you may need more disk arms, and certainly more RAM may be required.

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

Sidebar

Related Questions

Currently working with converting SQLException error messages into messages that are more useful for
Currently, my ListViews look like this: How can I achieve that Windows 7 native
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
Currently, I'm working on a project where I have a server - client relationship
Currently I am working on a system in PHP (for syncing data between webservices)
Currently, I have two Stored Procedures in SQL Server that handle retrieving a tree
Currently I am working on a matlab GUIDE and would like to include an
Currently, my MVC 3 app has a dependency on a static class that is
Currently, Enum.Parse supports only the comma as the value separator, so that MemberOne,MemberThree will
Currently I have a web service running in a tomcat (http:// localhost:8080/myApp/getUsers ). My

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.