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

Define push! and popfirst! for AbstractChannel #34274

Merged
merged 8 commits into from
Aug 29, 2020

Conversation

tkf
Copy link
Member

@tkf tkf commented Jan 6, 2020

This PR defines

julia/base/channels.jl

Lines 10 to 11 in a143db1

push!(c::AbstractChannel, v) = (put!(c, v); c)
popfirst!(c::AbstractChannel) = take!(c)

which are previously only defined for Channel.

This PR also fixes the inconsistency of push!(c::Channel, v) as reported in #34202; i.e., push!(c::Channel, v) now returns the first argument c like any other containers.

close #34202

@kshyatt
Copy link
Contributor

kshyatt commented Feb 8, 2020

@tkf looks like this needs a rebase. Could we get a review on this?

@tkf
Copy link
Member Author

tkf commented Apr 27, 2020

Friendly bump :)

@StefanKarpinski StefanKarpinski added the status:triage This should be discussed on a triage call label Apr 28, 2020
@JeffBezanson JeffBezanson added the status:merge me PR is reviewed. Merge when all tests are passing label Jul 16, 2020
@StefanKarpinski
Copy link
Sponsor Member

Sorry about the long delay here. Triage approves. If you dust this off and it passes CI, we can merge it.

@JeffBezanson JeffBezanson removed the status:triage This should be discussed on a triage call label Jul 17, 2020
@JeffBezanson JeffBezanson merged commit b630cd6 into JuliaLang:master Aug 29, 2020
@DilumAluthge DilumAluthge removed the status:merge me PR is reviewed. Merge when all tests are passing label Jan 11, 2021
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

6 participants