Skip to content

Commit

Permalink
add buffer for slice channel
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislusf committed Mar 4, 2016
1 parent 280fdfb commit 18a9077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flow/dataset_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (fc *FlowContext) Slice(slice interface{}) (ret *Dataset) {
sliceValue, sliceType := reflect.ValueOf(slice), reflect.TypeOf(slice)
sliceLen := sliceValue.Len()
chType := reflect.ChanOf(reflect.BothDir, sliceType.Elem())
chValue := reflect.MakeChan(chType, 0)
chValue := reflect.MakeChan(chType, 16)

go func() {
for i := 0; i < sliceLen; i++ {
Expand Down

0 comments on commit 18a9077

Please sign in to comment.