cluFlock
Installation and subsequent safe removal of flock
locks for data streams.
Use
- Exclusive LockFile
use ToFlock;
use File;
use io;
- Exclusive LockFile (FnOnce)
use Write;
use ToFlock;
use File;
use io;
- Exclusive LockFile (&File)
use ExclusiveFlock;
use File;
- Shared LockFile (&File)
use File;
use SharedFlock;
use io;
Support of platforms:
- Unix, Linux: Full support: SharedFlock (Wait, Try), ExclusiveFlock (Wait, Try), Unlock (Wait, Try).
- Windows: Full support: SharedFlock (Wait, Try), ExclusiveFlock (Wait, Try), Unlock (Wait, !Try). Unlock Try is not implemented and is considered additional unsafe functionality.
Features of platforms:
- Unix, Linux: The flock system call only works between processes, there are no locks inside the process.
- Windows: System calls (LockFileEx UnlockFileEx) work between processes and within the current process. If you use Shared and Exclusive locks, you can lock yourself in the same process.
Library flags:
- nightly: Allows you to safely transform the lock into the original data, the night version of the compiler and the cluFullTransmute library are required.
License
Copyright 2019 #UlinProject Denis Kotlyarov (Денис Котляров)
Licensed under the Apache License, Version 2.0