mirror of
https://github.com/SourceFellows/gobuch.git
synced 2026-10-27 10:11:44 +01:00
initial import
This commit is contained in:
commit
e223458dd4
423 files changed
+9871
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var lock sync.Mutex
|
||||
|
||||
func wasWichtiges() {
|
||||
lock.Lock()
|
||||
defer lock.Unlock()
|
||||
//auf ressourcen zugreifen
|
||||
fmt.Println("Arbeit an gesperrter Ressource")
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
wasWichtiges()
|
||||
lock.Lock()
|
||||
fmt.Println("am Ende")
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user