Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multithreading
Message
From
06/12/2022 09:01:55
 
 
To
All
General information
Forum:
C#
Category:
Coding, syntax and commands
Title:
Multithreading
Miscellaneous
Thread ID:
01685441
Message ID:
01685441
Views:
52
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...
Reply
Map
View

Click here to load this message in the networking platform