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

Add generic types + hide implementation #1

Merged
merged 6 commits into from May 12, 2020
Merged

Add generic types + hide implementation #1

merged 6 commits into from May 12, 2020

Conversation

axel-op
Copy link
Contributor

@axel-op axel-op commented May 12, 2020

Hi,

Thanks for creating this package, I find it very useful :)
I edited your code a little, I thought I could make this PR.

This PR:

  • Adds generic types. I think they're very necessary for type inference, particularly for the add method.
  • Hides the implementation. In particular, it makes private the following fields: nextCycle, isCancelled, isProcessing. Keeping them public could break the logic if they're modified. It also makes the process function private, I thought it would be better, what do you think?
  • Adds some documentation for public functions and fields.

* Add generic types
* Hide implementation (make some fields private)
* Make some fields final
* Throw Exception if 'add' is called after queue has been cancelled
Copy link
Owner

@rknell rknell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks thats good quality work. Merging now

@rknell rknell merged commit 39403da into rknell:master May 12, 2020
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.

None yet

2 participants