https://twitter.com/2btc10000pizzas/status/1303768424133398528

No idea what could be going on here :/
BOOST_CHECK_EQUAL(LockDirectory(dirname, lockname), true);
    
    bool threadresult;
    std::thread thr(TestOtherThread, dirname, lockname, &threadresult);
    thr.join();
    BOOST_CHECK_EQUAL(threadresult, true);
#ifndef WIN32
    
    char ch;
    BOOST_CHECK_EQUAL(write(fd[1], &LockCommand, 1), 1);
    BOOST_CHECK_EQUAL(read(fd[1], &ch, 1), 1);
    BOOST_CHECK_EQUAL((bool)ch, false);
    
    ReleaseDirectoryLocks();
    
    BOOST_CHECK_EQUAL(LockDirectory(dirname, lockname, true), true);
    
    BOOST_CHECK_EQUAL(write(fd[1], &LockCommand, 1), 1);
    BOOST_CHECK_EQUAL(read(fd[1], &ch, 1), 1);
    BOOST_CHECK_EQUAL((bool)ch, true);
    
    BOOST_CHECK_EQUAL(LockDirectory(dirname, lockname, true), false);
    
    BOOST_CHECK_EQUAL(write(fd[1], &UnlockCommand, 1), 1);
    BOOST_CHECK_EQUAL(read(fd[1], &ch, 1), 1);
    BOOST_CHECK_EQUAL((bool)ch, true);
    
    BOOST_CHECK_EQUAL(LockDirectory(dirname, lockname, true), true);