Skip to content

Commit

Permalink
News and compat annotation for #29092 (convert in put!(::Channel{T}, v))
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi authored and fredrikekre committed Dec 4, 2018
1 parent 67a1bd2 commit 7f47df6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Standard library changes
* `range` now accept `stop` as a positional argument ([#28708]).
* `parse(Bool, str)` is now supported ([#29997]).
* `copyto!(::AbstractMatrix, ::UniformScaling)` supports rectangular matrices now ([#28790]).
* In `put!(c::Channel{T}, v)`, `v` now gets converted to `T` as `put!` is being called ([#29092]).

Compiler/Runtime improvements
-----------------------------
Expand Down
3 changes: 3 additions & 0 deletions base/channels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ Append an item `v` to the channel `c`. Blocks if the channel is full.
For unbuffered channels, blocks until a [`take!`](@ref) is performed by a different
task.
!!! compat "Julia 1.1"
`v` now gets converted to the channel's type with [`convert`](@ref) as `put!` is called.
"""
function put!(c::Channel{T}, v) where T
check_channel_state(c)
Expand Down

0 comments on commit 7f47df6

Please sign in to comment.