Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
62f2f357
Commit
62f2f357
authored
Feb 12, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bedbf112
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
go/neo/master.go
go/neo/master.go
+3
-18
No files found.
go/neo/master.go
View file @
62f2f357
...
...
@@ -108,6 +108,7 @@ type nodeCome struct {
// nodeLeave represents "node (should be) disconnected" event.
type
nodeLeave
struct
{
peer
*
_MasteredPeer
err
error
// XXX needed ?
}
// _MasteredPeer represents context for all tasks related to one peer driven by master.
...
...
@@ -1415,22 +1416,6 @@ func (p *_MasteredPeer) notify(ctx context.Context) (err error) {
return
nil
}
/*
// waitAll waits for all tasks related to peer to complete and then notifies
// main that peer node should go. It is spawned under mainWG.
// XXX naming -> wait?
// XXX inline into identify
func (p *_MasteredPeer) waitAll(_ context.Context) error {
// don't take our ctx into account - it is ~ runCtx and should be
// parent of context under which per-peer tasks are spawned. This way
// if runCtx is canceled -> any per-peer ctx should be canceled too and
// wg.Wait should not block.
err := p.wg.Wait()
m.nodeLeaveq <- nodeLeave{p, err} // XXX detect if if main is already done
return nil // XXX or ctx.Err() ?
}
*/
// XXX run runs f after initial phase of peer acceptance is over.
//
...
...
@@ -1440,9 +1425,9 @@ func (p *_MasteredPeer) waitAll(_ context.Context) error {
// nodeTab to see if peer laddr is not overlapping with anyone's, and to assign
// nid). Because main is involved we cannot move it to completely separate task
// and give main only one Accept entry point to call.
func
(
p
*
_MasteredPeer
)
run
(
f
)
error
{
func
(
p
*
_MasteredPeer
)
run
(
ctx
context
.
Context
,
f
func
()
error
)
error
{
// XXX wait p.acceptDone
// XXX
f()
return
f
()
}
// allocNID allocates new node ID for a node of kind nodeType.
...
...
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