proxy.golang.org : github.com/zchee/ctxfs
Package ctxfs provides Context-aware file system access. A file is typically opened with Open or Create. The File object can provide io.Reader and io.Writer views on the file bound to a context using the IO method. For example to read a file: Interrupting the underlying system calls is implemented using operating system signals. This package uses SIGUSR1, programs that use this package should avoid using that signal to minimize the performance penalty. There are several known conditions where blocking system calls cannot be interrupted even by non-restartable signals. In those cases, canceling a context will not work. Examples include: - darwin will not interrupt a partially successful write to a pipe - linux will not interrupt normal disk I/O (see SA_RESTART in signal(7)). As cancellation of contexts should be treated as advisory, it is best to program with the expectation that some calls will not be cleaned up promptly. If this is not possible, calling the SetNonBlocking method on a File object will enable non-blocking I/O. The contract of the io.Reader and io.Writer interfaces will be met, though at a potential performance penalty. TODO: document and implement OpenLimit.
Registry
-
Source
- Documentation
- JSON
- codemeta.json
purl: pkg:golang/github.com/zchee/ctxfs
Keywords:
context
, filesystem
, go
License: BSD-3-Clause
Latest release: almost 7 years ago
First release: almost 7 years ago
Namespace: github.com/zchee
Stars: 2 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/zchee
Last synced: 3 months ago