Skip to content

Commit

Permalink
replace 'lambda' with 'anonymous function' in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur committed Nov 30, 2016
1 parent ed1549d commit 1dcffa9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions base/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ const DEFAULT_RETRY_JITTER_FACTOR = 0.1
const DEFAULT_RETRY_MESSAGE = ""

"""
retry(f, [retry_on]) -> Function
retry(f::Function, [retry_on]) -> Function
Returns a lambda that retries function `f` in the event of an exception. If
`retry_on` is a `Type` then retry only for exceptions of that type. If
`retry_on` is a function `test_error(::Exception) -> Bool` then retry only if
it is true.
Returns an anonymous function that retries `f` in the event of an exception.
If `retry_on` is a `Type` then retry only for exceptions of that type. If
`retry_on` is a `Function` which inputs an `Exception` then retry only if it
returns `true`.
# Examples
```julia
Expand Down
10 changes: 6 additions & 4 deletions base/workerpool.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,15 @@ function default_worker_pool()
end

"""
remote([::AbstractWorkerPool], f) -> Function
remote([::AbstractWorkerPool], f::Function) -> Function
Returns a lambda that executes function `f` on an available worker
Returns an anonymous function that executes `f` on an available worker
using [`remotecall_fetch`](:func:`remotecall_fetch`).
"""
remote(f) = (args...; kwargs...)->remotecall_fetch(f, default_worker_pool(), args...; kwargs...)
remote(p::AbstractWorkerPool, f) = (args...; kwargs...)->remotecall_fetch(f, p, args...; kwargs...)
remote(f::Function) = (args...; kwargs...)->
remotecall_fetch(f, default_worker_pool(), args...; kwargs...)
remote(p::AbstractWorkerPool, f::Function) = (args...; kwargs...)->
remotecall_fetch(f, p, args...; kwargs...)

type CachingPool <: AbstractWorkerPool
channel::Channel{Int}
Expand Down

0 comments on commit 1dcffa9

Please sign in to comment.