DeferredFutures.DeferredChannel
— TypeDeferredChannel(pid::Integer=myid(), num::Integer=1; content::DataType=Any) -> DeferredChannel
Create a DeferredChannel
with a reference to a remote channel of a specific size and type. f() is a function that when executed on pid
must return an implementation of an AbstractChannel
.
The default pid
is the current process.
DeferredFutures.DeferredChannel
— TypeDeferredChannel(pid::Integer=myid(), num::Integer=1; content::DataType=Any) -> DeferredChannel
Create a DeferredChannel
. The default pid
is the current process. When initialized, the DeferredChannel
will reference a Channel{content}(num)
on process pid
.
Note that the data in the DeferredChannel
will still be located wherever the first piece of data was put!
from. The pid
argument controls where the outermost reference to that data is located.
DeferredFutures.DeferredFuture
— TypeDeferredFuture(pid::Integer=myid()) -> DeferredFuture
Create a DeferredFuture
on process pid
. The default pid
is the current process.
Note that the data in the DeferredFuture
will still be located wherever it was put!
from. The pid
argument controlls where the outermost reference to that data is located.
DeferredFutures.DeferredRemoteRef
— TypeDeferredRemoteRef
is the common supertype of DeferredFuture
and DeferredChannel
and is the counterpart of Distributed.AbstractRemoteRef
.
DeferredFutures.reset!
— Methodreset!{T<:DeferredRemoteRef}(ref::T) -> T
Removes any data from the DeferredRemoteRef
and allows it to be reinitialized with data.
Returns the input DeferredRemoteRef
.
DeferredFutures.@defer
— Macro@defer Future(...)
@defer RemoteChannel(...)
@defer
transforms a Future
or RemoteChannel
construction into a 'DeferredFuture' or 'DeferredChannel' construction.
Base.close
— Methodclose(ref::DeferredChannel)
Closes a DeferredChannel
. An exception is thrown by:
put!
on a closedDeferredChannel
take!
andfetch
on an empty, closedDeferredChannel
Base.fetch
— Methodfetch(ref::DeferredRemoteRef) -> Any
Wait for and get the value of a remote reference.
Base.isready
— Methodisready(ref::DeferredRemoteRef) -> Bool
Determine whether a DeferredRemoteRef
has a value stored to it. Note that this function can cause race conditions, since by the time you receive its result it may no longer be true.
Base.put!
— Methodput!(rr::DeferredChannel, val) -> DeferredChannel
Store a value to the DeferredChannel
. If the channel is full, blocks until space is available. Returns its first argument.
Base.put!
— Methodput!(ref::DeferredFuture, v) -> DeferredFuture
Store a value to a DeferredFuture
. DeferredFuture
s, like Future
s, are write-once remote references. A put!
on an already set DeferredFuture
throws an Exception
. Returns its first argument.
Base.show
— Methodshow(io::IO, ref::DeferredChannel)
Print a simplified string representation of the DeferredChannel
with its RemoteChannel parameters and its function.
Base.show
— Methodshow(io::IO, ref::DeferredFuture)
Print a simplified string representation of the DeferredFuture
with its RemoteChannel parameters.
Base.take!
— Methodtake!(ref::DeferredChannel, args...)
Fetch value(s) from a DeferredChannel
, removing the value(s) in the processs. Note that take!
passes through args...
to the innermost AbstractChannel
and the default Channel
accepts no args...
.
Base.wait
— Methodwait(ref::DeferredRemoteRef) -> DeferredRemoteRef
Block the current task until a value becomes available on the DeferredRemoteRef
. Returns its first argument.
DeferredFutures.finalize_ref
— Methodfinalize_ref(ref::DeferredRemoteRef)
This finalizer is attached to both DeferredFuture
and DeferredChannel
on construction and finalizes the inner and outer RemoteChannel
s.
For more information on finalizing remote references, see the Julia manual[1].
Serialization.serialize
— Methodserialize(s::AbstractSerializer, ref::DeferredChannel)
Serialize a DeferredChannel such that it can de deserialized by deserialize
in a cluster.
Serialization.serialize
— Methodserialize(s::AbstractSerializer, ref::DeferredFuture)
Serialize a DeferredFuture such that it can de deserialized by deserialize
in a cluster.