Skip to content

Commit

Permalink
make stop-channel len-1
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfkdy committed Jan 25, 2017
1 parent 3607f7a commit 040e408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nex.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ func NewLexerWithInit(in io.Reader, initFun func(*Lexer)) *Lexer {
initFun(yylex)
}
yylex.ch = make(chan frame)
yylex.ch_stop = make(chan bool)
yylex.ch_stop = make(chan bool, 1)
var scan func(in *bufio.Reader, ch chan frame, ch_stop chan bool, family []dfa, line, column int)
scan = func(in *bufio.Reader, ch chan frame, ch_stop chan bool, family []dfa, line, column int) {
// Index of DFA and length of highest-precedence match so far.
Expand Down

0 comments on commit 040e408

Please sign in to comment.