def test_system_threading_tasks():
 temp_list = range(10000)
 temp_list_output = []
 Parallel.For.Overloads[(int, int, System.Action[int])](0, len(temp_list), (lambda x: temp_list_output.append(x)))
 AreEqual(len(temp_list), len(temp_list_output))
 temp_list_output.sort()
 AreEqual(temp_list, temp_list_output)
 temp_list = range(10000)
 temp_list_output = []
 Parallel.ForEach(xrange(10000), (lambda x: temp_list_output.append(x)))
 AreEqual(len(temp_list), len(temp_list_output))
 temp_list_output.sort()
 AreEqual(temp_list, temp_list_output)

def test_system_threading_tasks ( ) : temp_list = range ( 10000 ) temp_list_output = [ ] Parallel . For . Overloads [ ( int , int , System . Action [ int ] ) ] ( 0 , len ( temp_list ) , ( lambda x : temp_list_output . append ( x ) ) ) AreEqual ( len ( temp_list ) , len ( temp_list_output ) ) temp_list_output . sort ( ) AreEqual ( temp_list , temp_list_output ) temp_list = range ( 10000 ) temp_list_output = [ ] Parallel . ForEach ( xrange ( 10000 ) , ( lambda x : temp_list_output . append ( x ) ) ) AreEqual ( len ( temp_list ) , len ( temp_list_output ) ) temp_list_output . sort ( ) AreEqual ( temp_list , temp_list_output )
URL URL shouldnt be necessary to test this .