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?
Printable View
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?
Here is the "official" way: https://msdn.microsoft.com/en-us/lib...=vs.60%29.aspx (Providing an Asynchronous Notification Event, CoffeeMonitor class)
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