Documentation ¶
Index ¶
- func BytesToString(bytes []byte) (s string)
- func GoroutineID() uint64
- func HasOverlap(x, y []byte) bool
- func IsMutexLocked(m *sync.Mutex) bool
- func IsOnceDone(once *sync.Once) bool
- func IsRWMutexLocked(m *sync.RWMutex) bool
- func Pid() int
- func Pin() int
- func ResetSyncOnce(once *sync.Once)
- func StringToBytes(s string) []byte
- func UnlockMutex(mutex *sync.Mutex)
- func UnlockRWMutex(mutex *sync.RWMutex)
- func Unpin()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
BytesToString converts []byte to a string without an allocation.
func GoroutineID ¶
func GoroutineID() uint64
GoroutineID returns the goroutine id of the calling goroutine.
func HasOverlap ¶
HasOverlap reports whether x and y share memory at any index. The memory beyond the slice length is ignored.
Based on golang.org/x/crypto/internal/subtle
func IsMutexLocked ¶
IsMutexLocked will return true if sync.Mutex is locked.
func IsOnceDone ¶
IsOnceDone will return true if sync.Once.Do was invoked.
func IsRWMutexLocked ¶
IsRWMutexLocked will return true if sync.Mutex is locked.
func ResetSyncOnce ¶
ResetSyncOnce will reset sync.Once to default state.
func StringToBytes ¶
StringToBytes converts string to []byte without an allocation.
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.