Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all CtxCloser, ContextGroup in favor of goprocess #1030

Closed
jbenet opened this issue Apr 7, 2015 · 6 comments
Closed

Remove all CtxCloser, ContextGroup in favor of goprocess #1030

jbenet opened this issue Apr 7, 2015 · 6 comments
Assignees
Labels
topic/cleanup Topic cleanup

Comments

@jbenet
Copy link
Member

jbenet commented Apr 7, 2015

the codeabse is littered with the previous iterations. at this point goprocess appears to be robust (the only large problems in a long time have been in goprocess/limited)

@jbenet jbenet added the topic/cleanup Topic cleanup label Apr 7, 2015
@jbenet jbenet self-assigned this Apr 7, 2015
@whyrusleeping whyrusleeping mentioned this issue May 26, 2015
49 tasks
@whyrusleeping whyrusleeping mentioned this issue Jun 2, 2015
58 tasks
@rht
Copy link
Contributor

rht commented Jun 15, 2015

@jbenet What is the built-in (idiomatic) way for a goprocess.Process to return its parent or children Process? For the latter this can be done in ContextGroup with p.Children().
From the test file https://github.com/jbenet/goprocess/blob/ea63e9540cd19cb39e0e4c4442b9c27664287bb8/goprocess_test.go it looks like there needs to be a tree struct?

@jbenet
Copy link
Member Author

jbenet commented Jun 17, 2015

What is the built-in (idiomatic) way for a goprocess.Process to return its parent or children Process?

I haven't needed something like this yet. (net/context.Context doesn't either) What's the use case?

@rht
Copy link
Contributor

rht commented Jun 17, 2015

@jbenet
Copy link
Member Author

jbenet commented Jun 17, 2015

don't need it.

the construction:

pm.Children().Add(1)
go func {
  pm.Children().Done()
}()

becomes simply

proc.Go(func {})

@rht
Copy link
Contributor

rht commented Jun 17, 2015

Ok what about SetTeardown https://github.com/ipfs/go-ipfs/blob/master/core/core.go#L137? And WithContextAndTeardown https://github.com/ipfs/go-ipfs/blob/master/routing/dht/dht.go#L74 (this is unneeded with SetTeardown interface is available)?

@jbenet
Copy link
Member Author

jbenet commented Jun 17, 2015

there's WithTeardown but no SetTeardown yet. could make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/cleanup Topic cleanup
Projects
None yet
Development

No branches or pull requests

2 participants