-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSyntax5.go
More file actions
63 lines (33 loc) · 696 Bytes
/
Syntax5.go
File metadata and controls
63 lines (33 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
func (){
}
()
func (){
}()
func (){
}
go () // register to os
import ( "fmt"
"time"
) // C:\Program Files\Go\src
fmt.Println()
time.Sleep(1)
import ( "sync" // C:\Program Files\Go\src
)
var wg sync.WaitGroup
wg.Add()
Wg.Wait()
wg.Done()
var os chan int = make( chan int ) // HEAP
|| // Any one write or read memory will inform os schduler
os <- 1
<-os
select {
case msg:= <-os:
case os <- 1 :
}
import ( "sync" // C:\Program Files\Go\src
)
var mut sync.Mutex
mut.Lock()
// global variables
mut.UnLock()