Discover Packages
github.com/vbsw/golib/rwswitch
package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Jun 20, 2022
License: BSL-1.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
rwswitch
About
rwswitch is a package for Go to iterate over values 0, 1 and 2, differentiating between the read and write value. Read and write values are always distinct. It is published on https://github.com/vbsw/golib/rwswitch and https://gitlab.com/vbsw/golib/rwswitch .
Copyright
Copyright 2022, Vitali Baumtrok (vbsw@mailbox.org ).
rwswitch is distributed under the Boost Software License, version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt )
rwswitch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Boost Software License for more details.
References
Expand ▾
Collapse ▴
Documentation
¶
Package rwswitch iterates over values 0, 1 and 2, differentiating between the read and write value. Read and write values are always distinct.
type Switch struct {
State byte
States [56]byte
}
CurrRead returns current read index.
CurrWrite returns current write index.
NextRead returns next read index.
NextRead returns next write index.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.