mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 06:53:40 +00:00
internal/task: implement atomic primitives for preemptive scheduling
This commit is contained in:
committed by
Ron Evans
parent
789b5c6b78
commit
5b243f652c
@@ -0,0 +1,11 @@
|
||||
//go:build scheduler.threads
|
||||
|
||||
package task
|
||||
|
||||
// PMutex is a real mutex on systems that can be either preemptive or threaded,
|
||||
// and a dummy lock on other (purely cooperative) systems.
|
||||
//
|
||||
// It is mainly useful for short operations that need a lock when threading may
|
||||
// be involved, but which do not need a lock with a purely cooperative
|
||||
// scheduler.
|
||||
type PMutex = Mutex
|
||||
Reference in New Issue
Block a user