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

Lifted System.IO.Temp #93

Open
heitor-lassarote opened this issue Apr 18, 2022 · 0 comments
Open

Lifted System.IO.Temp #93

heitor-lassarote opened this issue Apr 18, 2022 · 0 comments

Comments

@heitor-lassarote
Copy link

I've noticed that unliftio's UnliftIO.Temporary doesn't lift temporary's System.IO.Temp, but instead reimplements most of that module.

As far as I understand, the main difference between both is that temporary will create the file/temporary template based on a random string, while unliftio will use the process's PID. This may actually have surprising behavior with concurrent programs (e.g., see this issue: UnkindPartition/temporary#8), where race conditions can happen. temporary mitigates this problem.

Is there any reason unliftio reimplements the module? Wouldn't it make it easier to keep up with updates in that library?

One more thing: why not re-export getCanonicalTemporaryDirectory?

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

No branches or pull requests

1 participant