-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
7e0ee53 to
ff64d28
Compare
@bwplotka
bwplotka
left a comment
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 so far! Thanks, some comments.
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.
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.
Let's use https://pkg.go.dev/golang.org/x/sync/errgroup maybe, so semantics are easier.
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 think there is a race during replacement operation.
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.
Lot's of races when we delete, unfortunately.. we need to make this operation locked potentially with Mutex.
But it has to be the full operation Locked:
- Checking if there is entry in map
- If no, create new future, and schedule colly
- If yes, grab reference to future
We might need to check IsValid interface, if this actually allows us to do this 🤔
bwplotka
commented
May 10, 2022
Still comments not addressed, I believe?
bwplotka
commented
Jun 7, 2023
Any progress?
Uh oh!
There was an error while loading. Please reload this page.
This PR parallelizes the file processing loop in
mdformatterfor faster formatting and link checking usingWaitGroupby spawning a goroutine for each file. (This also changes CLI spinner behavior as filenames cannot be shown due to multiple files being processed at once)Some caveats,
v.c.Wait()(flaky, maybe due to internal colly WaitGroup)