Skip to content

Add a flush mechanism - #9

Merged
jkodumal merged 2 commits into
masterfrom
jko/flush
Feb 6, 2015
Merged

jkodumal merged 2 commits into
masterfrom
jko/flush

Conversation

@jkodumal

@jkodumal jkodumal commented Feb 6, 2015

Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this may cause thread-safety issues if there is a regularly-scheduled flush happening at the same time as a manual flush.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Changed so that we handle the case where the pop method has fewer elements than we expect. The underlying queue is thread-safe, so the rest of this should be ok.

@pkaeding

pkaeding commented Feb 6, 2015

Copy link
Copy Markdown
Contributor

lgtm

jkodumal added a commit that referenced this pull request Feb 6, 2015
@jkodumal
jkodumal merged commit 2014be9 into master Feb 6, 2015
@jkodumal
jkodumal deleted the jko/flush branch February 6, 2015 23:58
zsiddique added a commit that referenced this pull request Jul 26, 2017
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