Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FileSystemWatcher
Message
De
14/11/2006 16:58:03
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
FileSystemWatcher
Versions des environnements
Environment:
VB.NET 1.1
Divers
Thread ID:
01169662
Message ID:
01169662
Vues:
56
I have been playing around with FileSystemWatcher, and had a question...

I set my event for Created, and I created a file... worked as expected with no problems. However, what it performs the event handler method, does it do it in a new thread? I put a thread.sleep in my event handler to test, and I dropped a few text files into the watched directory, and the thread.sleep didn't seem to affect things, so it leads me to believe that it is starting a new thread for every event.

If this is the case, is there a limit to how many threads can start? Let's say in my event handler I am performing an action that takes 30 seconds, and for some reason 100 files got created in those 30 seconds... will 30 threads get created?

This may be a generic EventHandler question rather than a FileSystemWatcher question...
Very fitting: http://xkcd.com/386/
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform