-
Notifications
You must be signed in to change notification settings - Fork 6
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
Git Remote Helper: Concurrency #29
Conversation
Notes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I have added a bunch of comments possibly worth dwelling upon.
(renderProcessError (errError e)) | ||
(renderSourceLoc (errCallStack e)) | ||
|
||
instance Exception ConcurrentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't like the fact of implementing Show
in a non-principled way, I guess you could try to implement displayException
for ConcurrentException
and see if that works out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only recently realised the existence of displayException
, and am confuse. Show
is a superclass of Exception
, so I still have to derive it for all error types - but that is something I try to avoid: one should always use the appropriate render*
function.
Am I asking too much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I am with you on this one. I guess the "best" thing you could do is to derive Show
using the standing deriving
mechanism but write your "pretty printed" version as part of displayException
. I do agree that the superclass constraint is a nuisance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4b113d1 destroyed my hopes
This is rather naive for now, as we're essentially running every IPFS API call in its own Haskell thread. Observed speedups are significant nevertheless. Upper bounds are placed on the number of concurrent connections to the API, as well as the number of OS threads (via the `-maxN` RTS option).
Closes #23