gofrs / Flock
Licence: bsd-3-clause
Thread-safe file locking library in Go (originally github.com/theckman/go-flock)
Stars: ✭ 288
Projects that are alternatives of or similar to Flock
logging
Generic file logger for .NET Core (FileLoggerProvider) with minimal dependencies
Stars: ✭ 109 (-62.15%)
Mutual labels: file
Lazer Database
PHP flat file database to store data with JSON
Stars: ✭ 254 (-11.81%)
Mutual labels: file
Chronos Timetracker
Desktop client for JIRA. Track time, upload worklogs without a hassle.
Stars: ✭ 273 (-5.21%)
Mutual labels: osx
github-content
Easily download files from github raw user content.
Stars: ✭ 21 (-92.71%)
Mutual labels: file
Darklightning
Simply the fastest way to transmit data between iOS/tvOS and OSX
Stars: ✭ 286 (-0.69%)
Mutual labels: osx
Tableexport
tableExport(table导出文件,支持json、csv、txt、xml、word、excel、image、pdf)
Stars: ✭ 261 (-9.37%)
Mutual labels: file
Vfile
Virtual file format for text processing used in @unifiedjs
Stars: ✭ 278 (-3.47%)
Mutual labels: file
nodejs-system-sleep
Sleep function for Node.js All platforms.
Stars: ✭ 47 (-83.68%)
Mutual labels: osx
Dosxvpn
Easily deploy your own personal VPN server with DNS adblocking running on DigitalOcean
Stars: ✭ 284 (-1.39%)
Mutual labels: osx
Vmware Usb Osx
Easily create a bootable USB installer for VMware ESXi / vSphere Hypervisor
Stars: ✭ 286 (-0.69%)
Mutual labels: osx
Passepartout Apple
User-friendly OpenVPN client app for iOS and macOS.
Stars: ✭ 284 (-1.39%)
Mutual labels: osx
flock
flock
implements a thread-safe sync.Locker interface for file locking. It also
includes a non-blocking TryLock() function to allow locking without blocking execution.
License
flock
is released under the BSD 3-Clause License. See the LICENSE
file for more details.
Go Compatibility
This package makes use of the context
package that was introduced in Go 1.7. As such, this
package has an implicit dependency on Go 1.7+.
Installation
go get -u github.com/gofrs/flock
Usage
import "github.com/gofrs/flock"
fileLock := flock.New("/var/lock/go-lock.lock")
locked, err := fileLock.TryLock()
if err != nil {
// handle locking error
}
if locked {
// do work
fileLock.Unlock()
}
For more detailed usage information take a look at the package API docs on GoDoc.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].