mr-brobot commented on PR #8015:
URL: https://github.com/apache/iceberg/pull/8015#issuecomment-1634687728

   > Just out curiosity, where are you able to run multi-processing?
   
   @Fokko Yes, though I was on Ubuntu [where the start method defaults to 
`fork`](https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods)
 so this issue wasn't present. Since Windows & macOS  default to the `spawn` 
method, and that is [considerably slower due to re-initialization of a new 
Python interpreter](https://peps.python.org/pep-0703/#multiprocessing), I think 
we should advise against multi-processing on these platforms in our 
documentation and perhaps log a warning.
   
   In fact, in a previous version of this PR, I thought to fall back to 
multi-threading when the start mode was `spawn`:
   ```python
   def _mp_pref() -> bool:
       """Returns whether multiprocessing is preferred."""
       start_method = get_start_method()
   
       if start_method != "fork":
           logger.debug("Multi-processing not preferred in current runtime: 
start_method=%s", start_method)
           return False
   
       return start_method == "fork"
   ```
   
   I'll get process spawning working and add some documentation. 😄 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to