.net - How to Monitor C# Threads from another Thread -
i have several threads running in threadpool in wpf app. need monitor them, possibly thread find out if of threads have terminated. how able achieve this.
for simplicity, usage scenario is:
- click button
- start several threads in threadpool.
- start thread monitor in threadpool
- lock ui of wpf app.
- release lock when thread in step 3 sets global value indicate threads started in (2) have terminated.
put threads in threadpool in array. when want wait pool threads exit, use waithandle.waitall
wait threads complete.
Comments
Post a Comment