dcsimg
Results 1 to 3 of 3

Thread: Run a Timer on a New Thread?

  1. #1

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,480

    Question 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.



  2. #2
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,257

    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)

  3. #3
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,317

    Re: Run a Timer on a New Thread?

    Quote Originally Posted by some1uk03 View Post
    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
  •  



Featured


Click Here to Expand Forum to Full Width