Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27416

VS 2012 dinamically filled hashset by 1 thread and related use from others (10+)thread

$
0
0
hi, i have a problem, my situation is:

thread1(3d1 for future) will execute some code, with httprequest too so time should be variable, and using regex will use matches.group to fill an hashset of string.

started with 3d1 others thread, like 10 or more, have to wait for some element in hashset and do some things with it , if them finish before 3d1 finish itself have to wait for more element in hashset.

how to do?

my firs solution is
3d2 pick elemnt an elemnt , add it to a DONE array and for every future element check if present in DONE array, if not continue.

but how to make it wait? using a while and a boolean on 3d1? have to check also .count of hashset and DONE array or risk to exit before real finish.

some tips?thanks

Viewing all articles
Browse latest Browse all 27416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>