Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Instantiating Classes Via Threading

Posted on 2013-05-25
2
Medium Priority
?
263 Views
Last Modified: 2013-05-26
I implement a lot of different classes so that calculations in the New constructor of each class are carried out after instantiation using:

Dim run1 as New Compute(param1, param2, etc)

Open in new window

where Compute is a Class.

Question is, what is the appropriate way to instantiate a Class using threading?   I need to start piling up a lot of work in the classes by using threads, since the Windows GUI tends to hang as soon as processing with 3-4 running classes gets started.  

This also raises some very important questions.  (first, fyi - there is no GUI interaction with controls on Form1 when the classes are running -- so there would likely be no cross-threading issues).   At run-time, it was observed that if, say, 5 classes are instantiated, the processes got too heavy and the Windows 8 GUI tended to hang.   Given this, can I sequentially implement threads so that as one finishes, the next one starts?

Lastly, by now I would think that with VB.NET 2010, 2012 there is an improved method for limiting CPU usage for a thread.   This would prevent a users screen from freezing during heavy computations.   What is the best way to guard against GUI hangs for users (in case they have fewer/slower processor cores, less RAM, etc.)?
0
Comment
Question by:lep1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
Alexander Eßer [Alex140181] earned 600 total points
ID: 39197558
0
 

Author Closing Comment

by:lep1
ID: 39197876
Just links provided.  While ok for giving credit where credit is due, the responseis not very specific.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question