concurrency.sender

Undocumented in source.

Members

Classes

SenderObjectImpl
class SenderObjectImpl(Sender)

A class extending from SenderObjectBase that wraps any Sender

Enums

isSender
eponymoustemplate isSender(T)
Undocumented in source.

Functions

checkSender
void checkSender()

checks that T is a Sender

connectHeap
OperationalStateBase connectHeap(Sender sender, Receiver receiver)

calls connect on the Sender but stores the OperationState on the heap

delay
auto delay(Duration dur)
Undocumented in source. Be warned that the author may not have intended to support it.
just
ValueSender!T just(T t)
Undocumented in source. Be warned that the author may not have intended to support it.
justFrom
JustFromSender!(Fun) justFrom(Fun fun)
Undocumented in source. Be warned that the author may not have intended to support it.
toSenderObject
auto toSenderObject(Sender sender)

Converts any Sender to a polymorphic SenderObject

Interfaces

OperationalStateBase
interface OperationalStateBase
Undocumented in source.
SenderObjectBase
interface SenderObjectBase(T)

A polymorphic sender of type T

Structs

DelaySender
struct DelaySender

A sender that delays before calling setValue

DoneSender
struct DoneSender

A sender that always calls setDone

JustFromSender
struct JustFromSender(Fun)
Undocumented in source.
OperationObject
struct OperationObject

Type-erased operational state object used in polymorphic senders

ThrowingSender
struct ThrowingSender

A sender that always sets an error

ValueSender
struct ValueSender(T)

A Sender that sends a single value of type T

VoidSender
struct VoidSender

A sender that always calls setValue with no args

Templates

OpType
template OpType(Sender, Receiver)
Undocumented in source.
canSenderThrow
template canSenderThrow(Sender)

This tests whether a Sender, by itself, makes any calls to the setError function. If a Sender is connected to a Receiver that has a non-nothrow setValue function, a Sender can still throw, but only Exceptions throw from that Receiver's setValue function.

isValidOp
template isValidOp(Sender, Receiver)

It is ok for the operation state to be on the heap, but if it is on the stack we need to ensure any copies are elided. We can't be 100% sure (the compiler may still blit), but this is the best we can do.

Meta