title: Python: joblib does not work on custom-defined function
body: <p>I am trying to use parallel computation package joblib in python. I can execute the following example and get the result </p>
  
  <pre><code>Parallel(n_jobs=8)(delayed(sqrt)(i) for i in range(10))
  </code></pre>
  
  <p>However, the following code does not work out.</p>
  
  <pre><code>from joblib import Parallel, delayed
  def f(x):
      return 1
  def y(x):
      result=Parallel(n_jobs=8)(delayed(x)(i) for i in range(10))
      return result
  if __name__ == '__main__':
      print y(f)
  </code></pre>
  
  <p>when I run the above code, it keeps running forever without generating any result or message.</p>
  
  <p>Can anyone figure out the reason for this strange behavior(I am using windows)? thanks</p>