Get return value for multi-processing functions in python
<p>I have two functions to run in parallel and each of them returns a value. I need to wait for both functions to finish and then process the returns from them. How could I achieve this in python. Assume</p>

<pre><code>def fun1():
   #do some calculation#
   return val1

def fun2():
   #do some calculation#
   return val2
</code></pre>

<p>I want fun1 and fun2 to run in parallel and then need to calculate</p>

<pre><code>valsum = val1+val2
</code></pre>