-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Channel fixes #362
Conversation
return true | ||
} | ||
|
||
private fun helpClose(closed: Closed<*>) { |
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.
Discuss: helpClose
should probably try to cancel job as well, so it will be linearizable along with channel
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.
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?
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.
The current implementation doesn't have a job, this branch is not going to master
.
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) |
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.
ARRAY_10
with a size of 8??
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.
Reported in #438
Channel
close
linearizabilityonClose
methodFixes for #359 and #260