Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
8d831de6
Commit
8d831de6
authored
Sep 15, 2010
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netchan: make -1 unlimited, as advertised.
R=adg CC=golang-dev
https://golang.org/cl/2198042
parent
7f0ddd68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
common.go
src/pkg/netchan/common.go
+1
-1
import.go
src/pkg/netchan/import.go
+1
-1
No files found.
src/pkg/netchan/common.go
View file @
8d831de6
...
...
@@ -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
...
...
src/pkg/netchan/import.go
View file @
8d831de6
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment