system.timers.timer: how to check if previous procedure is complete?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mgnlloyd@orange.net

    system.timers.timer: how to check if previous procedure is complete?

    i am using system.timers.t imer to perform a webrequest and populate a
    datatable with the returned values.

    Occasionaly if my connection becomes slow it takes longer for the
    webresponse and dataprocessing than the interval of the timer.

    the program stops responding and then in spurts will hammer the
    website with the webrequests in the queue.

    How can check in the timer procedure whether there exists in the
    threadpool a instance of itself currecntly running? ... if you see
    what i mean. thankyou
  • Steve Gerrard

    #2
    Re: system.timers.t imer: how to check if previous procedure is complete?

    mgnlloyd@orange .net wrote:
    i am using system.timers.t imer to perform a webrequest and populate a
    datatable with the returned values.
    >
    Occasionaly if my connection becomes slow it takes longer for the
    webresponse and dataprocessing than the interval of the timer.
    >
    the program stops responding and then in spurts will hammer the
    website with the webrequests in the queue.
    >
    How can check in the timer procedure whether there exists in the
    threadpool a instance of itself currecntly running? ... if you see
    what i mean. thankyou
    I think the normal approach for this situation is to disable the timer at the
    beginning of the event procedure, and re-enable it at the end. That way no timer
    events pile up behind it.


    Comment

    • mgnlloyd@orange.net

      #3
      Re: system.timers.t imer: how to check if previous procedure iscomplete?

      On 17 Jun, 04:13, "Steve Gerrard" <mynameh...@com cast.netwrote:
      mgnll...@orange .net wrote:
      i am using system.timers.t imer to perform a webrequest and populate a
      datatable with the returned values.
      >
      Occasionaly if my connection becomes slow it takes longer for the
      webresponse and dataprocessing than the interval of the timer.
      >
      the program stops responding and then in spurts will hammer the
      website with the webrequests in the queue.
      >
      How can  check in the timer procedure whether there exists in the
      threadpool a instance of itself currecntly running? ... if you see
      what i mean. thankyou
      >
      I think the normal approach for this situation is to disable the timer at the
      beginning of the event procedure, and re-enable it at the end. That way notimer
      events pile up behind it.
      thankyou stevey G, ill give that a go.

      Comment

      Working...