mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 13:29:01 +00:00
sync: add a package doc
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
// Package sync implements synchronization primitives similar to those provided by the standard Go implementation.
|
||||||
|
// These are not safe to access from within interrupts, or from another thread.
|
||||||
|
// The primitives also lack any fairness guarantees, similar to channels and the scheduler.
|
||||||
|
package sync
|
||||||
@@ -5,8 +5,6 @@ import (
|
|||||||
_ "unsafe"
|
_ "unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// These mutexes assume there is only one thread of operation and cannot be accessed safely from interrupts.
|
|
||||||
|
|
||||||
type Mutex struct {
|
type Mutex struct {
|
||||||
locked bool
|
locked bool
|
||||||
blocked task.Stack
|
blocked task.Stack
|
||||||
|
|||||||
Reference in New Issue
Block a user