|
-
Sep 9th, 2004, 05:17 AM
#1
Thread Starter
Member
how to wait for 5 seconds before proceeding
the situation is that there is an installation which calls a web service to get some information which is useful but not necessary for the applicaiton.
Now during the installation, it is possible that the network may be down (lags, slow service etc.) or the service is not present due to some reasons.
what i want to do here is that the installation should wait for about 5 secs after the call to the web service and then proceed regardless of the results of the function call (i.e not to wait if the service cannot be contacted for some reason )
how can i achive that.
THnkx
-
Sep 9th, 2004, 05:29 AM
#2
Registered User
Threading.Thread.Sleep(5000)
-
Sep 9th, 2004, 05:32 AM
#3
Thread Starter
Member
that would work when the function call has been made and the response has been recieved.
Will it also work when the application is waiting for a response from the other side because the problem occurs when the applicaiton gets 'lost' in search of the service on the other side.
Thankx
-
Sep 9th, 2004, 05:38 AM
#4
Registered User
Hi,
Just thinking quickly, so scuse me if I talk ****e
Maybe call the webservice in a seperate thread, and as soon the thread start, waits for 5 seconds.
The web service can set some public variables (if successfull). Or figure out a way of calling a function returning values using a thread (so far i can call only subs)
Anycase, after the 5 seconds, the webservice would have been running for 5 seconds, and you can see if the thread is still running (thread.isalive i think). Abort it if so (thread.abort). You then might or not have values in that public variables.
-
Sep 9th, 2004, 05:42 AM
#5
Thread Starter
Member
ok, will try to and tell u what happend
-
Sep 9th, 2004, 05:44 AM
#6
Registered User
feedback will be gr8.
For incase you did not get there yet, it's a good idea setting aside a day or two figuring out threading in vb.net.
Let me know if you need a tutorial and sample app. Got a nice few from the vb.net resource kit. too big to add here though
-
Sep 9th, 2004, 05:59 AM
#7
Thread Starter
Member
sure that will be a great help
plz mail it to "[email protected]" if thats easy for you
thankx
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
|