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 #17898(alternative to #18149 randomPathName called twice in a row can return the same string on windows) #18412

Closed
wants to merge 5 commits into from

Conversation

ringabout
Copy link
Member

close #17898

@@ -4,7 +4,8 @@ internal API for now, API subject to change

# xxx move other git utilities here; candidate for stdlib.

import std/[os, osproc, strutils, tempfiles]
import std/[os, osproc, strutils, random]
from std/tempfiles import genTempPath
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from std/tempfiles {.all.} import genTempPath seems to cause booting issue. So I have to public genTempPath.

@ringabout ringabout changed the title fix #17898(randomPathName called twice in a row can return the same string on windows) fix #17898(alternative to #18149 randomPathName called twice in a row can return the same string on windows) Jul 1, 2021
@ringabout ringabout closed this Jul 1, 2021
@timotheecour
Copy link
Member

instead of requiring client code to pass in a Rand state, how about let's use atomics, as in oids

@Araq
Copy link
Member

Araq commented Jul 1, 2021

Passing the rand state is fine... :-/

@Araq Araq reopened this Jul 1, 2021
@juancarlospaco
Copy link
Collaborator

juancarlospaco commented Jul 3, 2021

I like the var Rand and the inline, I dont know why this API is not in-place, but Ok.

@ringabout ringabout closed this Aug 22, 2021
@ringabout
Copy link
Member Author

Succeeded by #18729

@ringabout ringabout deleted the c3 branch August 22, 2021 03:46
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.

randomPathName called twice in a row can return the same string on windows
4 participants