sync: add a package doc
Этот коммит содержится в:
родитель
5e719b0d3d
коммит
f21fdd1f76
2 изменённых файлов: 4 добавлений и 2 удалений
4
src/sync/doc.go
Обычный файл
4
src/sync/doc.go
Обычный файл
|
@ -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
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче