Skip to content

Commit

Permalink
News and compat annotation for JuliaLang#29092 (convert in put!(::Cha…
Browse files Browse the repository at this point in the history
…nnel{T}, v))
  • Loading branch information
mortenpi committed Dec 1, 2018
1 parent 3676001 commit f7e026e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Expand Up @@ -71,6 +71,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
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 f7e026e

Please sign in to comment.