I am trying to get a result from the tasks method in IronPython similar to how results.get
works with CPython multiprocessing.Queue
from System.Threading.Tasks import *
def testThread(dataPnt,constData):
return dataPnt
def main():
dataToSplit = range(5)
constData = 10
threadResult = Parallel.ForEach(dataToSplit, lambda dataPnt: testThread(dataPnt,constData))
print(threadResult)
main()
At this point threadResult is System.Threading.Tasks.ParallelLoopResult
but I can't find any decent documentation. The closest has been this post but it is incrementing and I need an array returned.