Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build on windows #101

Merged
merged 1 commit into from
Dec 28, 2021
Merged

Conversation

EduardoRFS
Copy link
Contributor

@EduardoRFS EduardoRFS commented Apr 26, 2021

This patch allows parmap to build on Windows, but not to run on Windows as there is no Unix.fork.

I have no idea if it's possible to make it fully work on Windows at all, using ZwCreateProcess is possible and I was able to make it work, but it's an NT API and that's hackish as it can get.

So with this libraries can still use parmap but just add an if Sys.win32 to not use parmap when it's Windows

@rdicosmo
Copy link
Owner

Thanks @EduardoRFS for this suggestion: I'm merging it!
Parmap relies on the fork POSIX primitive to do its work, and it is hard to get this working in Windows. I have no way of telling if there is interest in having Parmap working natively on Windows, but if you already know how the needed magic to support it, it would be fun to add it :-)

@rdicosmo rdicosmo merged commit 3511432 into rdicosmo:master Dec 28, 2021
@UnixJunkie
Copy link
Collaborator

UnixJunkie commented Dec 29, 2021 via email

@rdicosmo
Copy link
Owner

@UnixJunkie: just to avoid confusion, developing a fully compatible equivalent of parmap without Unix.fork is a highly nontrivial task, and there is no such plan at the moment.

@EduardoRFS EduardoRFS deleted the support-to-windows branch December 29, 2021 22:41
@EduardoRFS
Copy link
Contributor Author

I think using ZwCreateProcess is a bad idea in general, so for windows it should probably just use the main process. So that at least the compatibility is there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants