Created
July 14, 2018 05:09
-
-
Save nglee/164bde324c6c03a50047648c222d0b28 to your computer and use it in GitHub Desktop.
Persistence of file_lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/interprocess/sync/file_lock.hpp> | |
#include <iostream> | |
using namespace boost::interprocess; | |
int main() | |
{ | |
file_lock flock("bitest5.cpp"); | |
flock.lock(); | |
std::cout << "The process locked an file_lock," << std::endl; | |
std::cout << "and is going to exit without unlocking the lock." << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment