Skip to content

Commit 8ef631f

Browse files
committed
Fixed comments.
1 parent 89283d0 commit 8ef631f

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎gmw/peer.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (p *Peer) shareInput(o *Peer) error {
7979
return nil
8080
}
8181

82-
// SendBitvec sends bit vector to the connection conn.
82+
// SendBitvec sends a bit vector over the connection.
8383
func (p *Peer) SendBitvec(conn *p2p.Conn, bits []uint64) error {
8484
var ld ot.LabelData
8585
var l ot.Label
@@ -101,7 +101,7 @@ func (p *Peer) SendBitvec(conn *p2p.Conn, bits []uint64) error {
101101
return conn.Flush()
102102
}
103103

104-
// ReceiveBitvec receives bits vector from the connection conn.
104+
// ReceiveBitvec receives a bit vector from the connection.
105105
func (p *Peer) ReceiveBitvec(conn *p2p.Conn, bits []uint64) error {
106106
var ld ot.LabelData
107107
var l ot.Label
@@ -127,7 +127,7 @@ func (p *Peer) ReceiveBitvec(conn *p2p.Conn, bits []uint64) error {
127127
return nil
128128
}
129129

130-
// SendBitvec2 sends two bit vector to the connection conn.
130+
// SendBitvec2 sends two bit vectors over the connection.
131131
func (p *Peer) SendBitvec2(conn *p2p.Conn, b0, b1 []uint64) error {
132132
var ld ot.LabelData
133133
var l ot.Label
@@ -162,7 +162,7 @@ func (p *Peer) SendBitvec2(conn *p2p.Conn, b0, b1 []uint64) error {
162162
return conn.Flush()
163163
}
164164

165-
// ReceiveBitvec2 receives two bits vector from the connection conn.
165+
// ReceiveBitvec2 receives two bit vectors from the connection.
166166
func (p *Peer) ReceiveBitvec2(conn *p2p.Conn, b0, b1 []uint64) error {
167167
var ld ot.LabelData
168168
var l ot.Label

‎gmw/triples.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (triples *Triples) Append(src *Triples, n int) int {
8989
return words * 64
9090
}
9191

92-
// TriplePool implements beaver triple pool.
92+
// TriplePool implements a Beaver triple pool.
9393
type TriplePool struct {
9494
m sync.Mutex
9595
c *sync.Cond
@@ -113,19 +113,19 @@ func NewTriplePool() *TriplePool {
113113
return pool
114114
}
115115

116-
// Close closes the beaver triple bool.
116+
// Close closes the beaver triple pool.
117117
func (pool *TriplePool) Close() {
118118
pool.m.Lock()
119119
pool.closed = true
120120
pool.c.Broadcast()
121121
pool.m.Unlock()
122122
}
123123

124-
// Get gets count triples from the triple pool and returns them in the
125-
// triples. The function resizes triples if needed. If the triple pool
126-
// does not have count triples, the function waits until the triple
127-
// generation offline process produces the required amount of new
128-
// triples.
124+
// Get retrieves count triples from the triple pool and returns them
125+
// in the triples. The function resizes triples if needed. If the
126+
// triple pool does not have count triples, the function waits until
127+
// the triple generation offline process produces the required amount
128+
// of new triples.
129129
func (pool *TriplePool) Get(count int, triples *Triples) {
130130
pool.m.Lock()
131131
for ofs := 0; ofs < count; {

0 commit comments

Comments
 (0)