|
-
Nov 12th, 2016, 02:55 PM
#1
Thread Starter
Frenzied Member
Run a Timer on a New Thread?
Hello,
I know VB is not Fully multi threaded as we know it, but I've seen some examples of Multithreading, but haven't quite grasped the idea.
I was wondering If I could have a Timer running on a new Thread to ease on resources?
Any ideas?
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

-
Nov 12th, 2016, 03:45 PM
#2
Re: Run a Timer on a New Thread?
Here is the "official" way: https://msdn.microsoft.com/en-us/lib...=vs.60%29.aspx (Providing an Asynchronous Notification Event, CoffeeMonitor class)
-
Nov 12th, 2016, 06:32 PM
#3
Re: Run a Timer on a New Thread?
 Originally Posted by some1uk03
I was wondering If I could have a Timer running on a new Thread to ease on resources?
Timers are not resource-intensive - not anymore (you can fire up a hundred of
them in a given Process - and the Process will still remain at 0% CPU-usage).
Perhaps you mean the "routines you plan to call within a Timer-Event"?
Those might cause a higher CPU-load (when regularly triggered within
a shorter interval) - but shifting those routines into another thread would
not "lessen" the CPU-usage (would not be "easier on the resources", when
called-upon with the same frequency as before in the Main-Thread).
The thing you might be after is, to "not block" the Main-Thread (with longer
actions) to keep it responsive (GUI-wise) - and for that, threading would
make sense.
Olaf
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|