Async Delegate question

  • Thread starter Thread starter Viet
  • Start date Start date
I don't exactly understand what you mean. By "infinite polling", do you
mean sitting in a loop and polling indefinitely (maybe sleeping once in
a while), or polling once every X seconds for ever?

If it's the former, then yes, you can. Fire the polling method using an
async delegate to run it on a second thread.

If it's the latter, no, you can't directly - you'll need to use a
System.Threading.Timer to trigger the poll once every X seconds.

Regards,
-Adam.
 
Actually, its the former: fire the polling method by sitting in a loop and
polling indefinitely. The code is I used is:
if objectIASyncResult.iscompleted = true then
'do something

but everytime I execute it, it executes once. Is there any code examples for
this?
THanks,
Viet
 

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

Back
Top