Skip to content

Conversation

@chiamakacha
Copy link

inspired from: @chr1sto14

  1. Simplified manager, no need to fill the channel on initialisation
  2. added check in tests to verify if all tasks are being executed.
  3. changed to go module structure

@zenthangplus
Copy link
Owner

Thank @chiamakacha @chr1sto14, i'm working on this MR

@zenthangplus zenthangplus changed the base branch from master to release/1.1 August 1, 2021 15:05
@zenthangplus
Copy link
Owner

@chiamakacha i see you remove close method, why you do that? please explain more

@chiamakacha
Copy link
Author

chiamakacha commented Aug 1, 2021

@chiamakacha i see you remove close method, why you do that? please explain more

@zenthangplus in original code, we were creating a go thread for management and having a close method to clean up resources i.e, go thread made sense.
Now we are not using any infinite go thread, so having close method made no sense to me. Even in the tests we had to use close with break statement and if we remove break from the if block, function doesn't behave properly.

@chiamakacha
Copy link
Author

One more point:
Lets say we use close method to close manager channel, then wait method will throw runtime error, so user will have to be more cautious using close method.
imo removing close method makes this package simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants