timer issue

J

JvCoach23

I have a timer that runs a sub. In that sub it calls 5 other subs.

subMain()
sub1()
sub2()
sub3()
sub4()
sub5()
end sub

within sub1, when I make the call to it, it works great, sub1 fires, then
sub2...

now when I add a web service call to write to a sql database, the sub1 is
the only one that fires.. sub2 - 5 never fires.. it just go to subMain,
then sub1, sub1, sub1, sub1..

can someone help me out with what I'm doing wrong.
thanks
 
R

rawCoder

Hi JvCoach32

I am not sure what you are doing in the Sub1 , but apparently you have made
a blocking call.
Try calling Sub1 from say a buttons click event, if the form hangs up it
will mean that this is the problem.

I am not sure and someone might correct me here that if you pause the
execution you can see multiple threads for each hung sub1 call from Timers
tick event.

HTH
rawCoder
 
J

JvCoach23

Here is what I'm doing in sub1

Dim intVal As Integer
intVal = Math.Round(oCpuMon.NextValue)
'Console.WriteLine(oCpuMon.NextValue & " - Cpu")
'Console.WriteLine(intVal & " - intVal value")

Console.WriteLine("CPU %:" & intVal)
wsPerfmon.spPMDataInsert(intTblPMInstanceId, decValue)

does that help you. This is a console app.. do you have any idea why this
would be causing a problem..
Thanks
Shannon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top