Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
591265fc
Commit
591265fc
authored
Jan 14, 2014
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reflect: better document the tri-state for TryRecv
R=rsc, iant CC=golang-codereviews
https://golang.org/cl/52360043
parent
8454e2c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/pkg/reflect/value.go
src/pkg/reflect/value.go
+3
-3
No files found.
src/pkg/reflect/value.go
View file @
591265fc
...
@@ -1832,9 +1832,9 @@ func (v Value) String() string {
...
@@ -1832,9 +1832,9 @@ func (v Value) String() string {
// TryRecv attempts to receive a value from the channel v but will not block.
// TryRecv attempts to receive a value from the channel v but will not block.
// It panics if v's Kind is not Chan.
// It panics if v's Kind is not Chan.
// If the receive
cannot finish without blocking, x is the zero Val
ue.
// If the receive
delivers a value, x is the transferred value and ok is tr
ue.
//
The boolean ok is true if the value x corresponds to a send
//
If the receive cannot finish without blocking, x is the zero Value and ok is false.
//
on the channel, false if it is a zero value received because the channel is closed
.
//
If the channel is closed, x is the zero value for the channel's element type and ok is false
.
func
(
v
Value
)
TryRecv
()
(
x
Value
,
ok
bool
)
{
func
(
v
Value
)
TryRecv
()
(
x
Value
,
ok
bool
)
{
v
.
mustBe
(
Chan
)
v
.
mustBe
(
Chan
)
v
.
mustBeExported
()
v
.
mustBeExported
()
...
...
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