mirror of
https://github.com/golang/go
synced 2024-11-25 06:07:58 -07:00
netchan: make -1 unlimited, as advertised.
R=adg CC=golang-dev https://golang.org/cl/2198042
This commit is contained in:
parent
7f0ddd682a
commit
8d831de685
@ -39,7 +39,7 @@ type header struct {
|
||||
|
||||
// Sent with a header once per channel from importer to exporter to report
|
||||
// that it wants to bind to a channel with the specified direction for count
|
||||
// messages. If count is zero, it means unlimited.
|
||||
// messages. If count is -1, it means unlimited.
|
||||
type request struct {
|
||||
count int64
|
||||
dir Dir
|
||||
|
@ -114,7 +114,7 @@ func (imp *Importer) run() {
|
||||
// Import imports a channel of the given type and specified direction.
|
||||
// It is equivalent to ImportNValues with a count of -1, meaning unbounded.
|
||||
func (imp *Importer) Import(name string, chT interface{}, dir Dir) os.Error {
|
||||
return imp.ImportNValues(name, chT, dir, 0)
|
||||
return imp.ImportNValues(name, chT, dir, -1)
|
||||
}
|
||||
|
||||
// ImportNValues imports a channel of the given type and specified direction
|
||||
|
Loading…
Reference in New Issue
Block a user