Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multithreading
Message
De
06/12/2022 09:01:55
 
 
À
Tous
Information générale
Forum:
C#
Catégorie:
Code, syntaxe and commandes
Titre:
Multithreading
Divers
Thread ID:
01685441
Message ID:
01685441
Vues:
53
Hi
I have an employee list, with few thousands record.
when i loop employee list, it will Helper.ExportA()
1) query data
2) generate report
3) export in pdf
4) compress
5) encrypt

I was thinking to call Helper.ExportA() within the loop in aync mode (Task method / task.Run())

however, I wan to control it, as1000X threads would kill the perf as well

how could I control number of threads, then wait for any thread to complete then launch new thread again if any left, but limited to 50 threads at a time for example

THank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Répondre
Fil
Voir

Click here to load this message in the networking platform