Skip to content

Channel fixes #362

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

Closed
wants to merge 6 commits into from
Closed

Channel fixes #362

wants to merge 6 commits into from

Conversation

qwwdfsad
Copy link
Collaborator

Channel close linearizability
onClose method
Fixes for #359 and #260

return true
}

private fun helpClose(closed: Closed<*>) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Discuss: helpClose should probably try to cancel job as well, so it will be linearizable along with channel

Copy link
Contributor

Choose a reason for hiding this comment

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

Given the current implementation doesn't try to cancel the job, could this lead to a deadlock if somehow, a runBlocking { ... } call is waiting for it because it'd be waiting for the job to complete?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The current implementation doesn't have a job, this branch is not going to master.

@qwwdfsad qwwdfsad closed this Jul 17, 2018
override fun toString(): String = "ArrayChannel(1)"
},
ARRAY_10 {
override fun create(): Channel<Int> = ArrayChannel(8)
override fun create(job: Job): Channel<Int> = ArrayChannel(8, job)
Copy link
Contributor

Choose a reason for hiding this comment

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

ARRAY_10 with a size of 8??

Copy link
Contributor

Choose a reason for hiding this comment

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

Reported in #438

@qwwdfsad qwwdfsad deleted the channel-fixes branch August 24, 2018 12:26
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