Why does this Parallel.ForEach code freeze the program up?

后端 未结 6 1652
南笙
南笙 2020-11-30 13:37

More newbie questions:

This code grabs a number of proxies from the list in the main window (I couldn\'t figure out how to make variables be available between diffe

6条回答
  •  醉梦人生
    2020-11-30 14:09

    If anyone's curious, I kinda figured it out but I'm not sure if that's good programming or any way to deal with the issue.

    I created a new thread like so:

    Thread t = new Thread(do_checks);
    t.Start();
    

    and put away all of the parallel stuff inside of do_checks().

    Seems to be doing okay.

提交回复
热议问题