• Tamar Christina's avatar
    Make System.IO.openTempFile thread-safe on Windows · 2fc621df
    Tamar Christina authored
    This calls out to the Win32 API `GetTempFileName` to generate
    a temporary file. Using `uUnique = 0` guarantees that the file
    we get back is unique and the file is "reserved" by creating it.
    Test Plan:
    I can't think of any sensible tests that shouldn't run for a while
    to verify. So the example in #10731 was ran for a while and no
    collisions in new code
    Reviewers: hvr, bgamari, erikd
    Reviewed By: bgamari
    Subscribers: RyanGlScott, rwbarton, thomie, carter
    GHC Trac Issues: #10731
    Differential Revision: https://phabricator.haskell.org/D4278
    (cherry picked from commit 46287af0)
To find the state of this project's repository at the time of any of these versions, check out the tags..
changelog.md 24.6 KB