File tree 2 files changed +5
-9
lines changed
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Flow
2
2
🌊Flow is an easy-used concurrent calculate model in Go.
3
+
3
4
Flow can easily limit the maxium number of concurrent goroutine and can be very straight-forward to use.
4
- Basically, flow is a 2d matrix and it runs jobs row-by-row and all the jobs in same row will run concurrently.
5
+
6
+ Basically, flow is a 2D matrix and it run jobs row-by-row which in same row, the jobs will run concurrently.
5
7
6
8
# Example
7
9
``` Go
@@ -20,10 +22,7 @@ func main() {
20
22
counter++
21
23
fmt.Println (" level" , counter)
22
24
}
23
- // Next start a new level, and put the job `showLevel` in this level
24
- // the first level will be created by Flow
25
- // so you can also use With to add showLevel in the first level
26
- // f.With(showLevel)
25
+ // Next starts a new level, and put the job `showLevel` in it
27
26
f.Next (showLevel)
28
27
for i := 0 ; i < 20 ; i++ {
29
28
v := i
Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ func Example() {
14
14
counter ++
15
15
fmt .Println ("level" , counter )
16
16
}
17
- // Next start a new level, and put the func `showLevel` in this level
18
- // the first level will be created by Flow
19
- // so you can also use With to add showLevel in the first level
20
- // f.With(showLevel)
17
+ // Next starts a new level, and put the job `showLevel` in it
21
18
f .Next (showLevel )
22
19
for i := 0 ; i < 20 ; i ++ {
23
20
v := i
You can’t perform that action at this time.
0 commit comments