RE: asynchronous methods or create my own threads?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



djc,
If you know you are only going to have 4 access points then most likely just
creating 4 individual threads as background threads each to do the same work
with the same method is the easiest. Asynchronicity won't buy much for you
here since each thread (by your definition) won't be completely done until it
has successfully pinged the access point it rebooted as "back-up".

Peter


--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"djc" wrote:

here is my task:
I am writing a command line utility that I can use to quickly reboot some
wireless access points (why? short answer: budget). That part is already
done. All it does is send the url that is essentially the command to reboot
to one or all of my access points. This works fine. What I want to add to
this is the ability for my program to let me know when the access points
have completed rebooting. In simple terms I just need to repeatedly ping the
access point until it responds which tells me its back up. If I were content
just doing one at a time then no problem. But I'm not.

Rather than send my reboot command to one access point and have to wait for
it to come back up before going on to the next access point I want to send
the command to all the access points (4 in my case) and use 4 new seperate
threads, 1 for each access point, to send the pings. I want my console to
show some indication that its working like printing dots and as each access
point comes back up (responds to the ping) indication should be sent to the
console.

as concisely as possible: command to reboot is sent, starts pinging, pings
first get replies for a few seconds until the access point actually goes
down, then no ping replies indicate its down, then when ping replies come
back again I know the access point is back up again and the reboot was
successfull.

Thats what I'm looking to do. I have done no mutlithreaded programming
before and know only of the general concepts of the asynch pattern and using
the thread classes to manage your own threads.

So what I am hoping to get out of this post is direction on which method
(asynch or threading) is best suited for my task. I will then start reading
up on that method. Any further info or suggestions on my specific task is of
course welcome as well.



.



Relevant Pages

  • asynchronous methods or create my own threads?
    ... I am writing a command line utility that I can use to quickly reboot some ... In simple terms I just need to repeatedly ping the ... down, then no ping replies indicate its down, then when ping replies come ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: bug w2k
    ... it seems to work with command line programs other than ping - i've ... > - A reboot is required to kill the session. ... >Subject: bug w2k ...
    (Vuln-Dev)
  • Re: Not able to know the device is alive or not after rebooting...
    ... > - I am just spawn on that device and issuing the reboot command. ... > - after issuing command devies has been rebooted. ... Shell i do ping every time ...
    (comp.lang.tcl)
  • Re: Good wireless signal - but browser cannot find it?
    ... But when I gave the command to see the route table, ... But his browser cannot find any connection and displays the error page ... The firewall is Norton - but disabling it temporarily made no difference. ... ping resolver1.opendns.com ...
    (microsoft.public.windowsxp.network_web)
  • Re: Missing items in XP
    ... ISP asked me to ping a site and ping was not recognized as a command. ... Isp man told me I had lost essential tools in XP. ... You can confirm this by opening a command prompt, changing to the windows\system32 directory, and running commands such as ping. ... Do I need those user variables? ...
    (microsoft.public.windowsxp.help_and_support)