forked from fl00r/go-tarantool-1.6
-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
The channel:
Line 19 in e72726b
| done chan struct{} |
Is used to notify a waiter about a response. It could be easily replaced with a condition variable + boolean value.
But it's not that simple. We also have a method that returns a channel to the user. In this case we need to create the channel on demand:
Lines 127 to 133 in e72726b
| // WaitChan returns channel which becomes closed when response arrived or error occurred. | |
| func (fut *Future) WaitChan() <-chan struct{} { | |
| if fut.done == nil { | |
| return closedChan | |
| } | |
| return fut.done | |
| } |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress