Discover Packages
github.com/256dpi/lungo
dbkit
package
Version:
v0.3.7
Opens a new window with list of versions in this module.
Published: Mar 27, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
AtomicWriteFile reads from r and writes to the file named by path. To ensure
atomicity the contents are written to a temporary file that is linked to the
location after being successfully written.
type Semaphore struct {
}
Semaphore manages access to a resource using a set of tokens.
NewSemaphore will create and return a new semaphore.
Acquire will acquire a token from the semaphore. If the function returns
true the token must be released back to the semaphore exactly once.
Release will release a token to the semaphore. It is critical that this is
only done once per token.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.