vibe.d beta banner
get vibe.d
0.8.1

Asynchronous I/O that doesn’t get in your way, written in D

Module vibe.core.concurrency

Functions and structures for dealing with threads and concurrent access.

This module is modeled after std.concurrency, but provides a fiber-aware alternative to it. All blocking operations will yield the calling fiber instead of blocking it.

Functions

NameDescription
assumeIsolated(object)Unsafe facility to assume that an existing reference is unique.
async(callable, args)Starts an asynchronous computation and returns a future for the result value.
lock(object)Locks the given shared object and returns a ScopedLock for accessing any unshared members.
makeIsolated(args)Creates a new isolated object.
makeIsolatedArray(size)Creates a new isolated array.
prioritySend(tid, args)
receive(ops)
receiveOnly()
receiveTimeout(timeout, ops)
send(tid, args)
setMaxMailboxSize(tid, messages, on_crowding)
setMaxMailboxSize(tid, messages, on_crowding)
thisTid()Returns the Tid of the caller (same as Task.getThis())

Structs

NameDescription
FutureRepresents a values that will be computed asynchronously.
ScopedLockProxy structure that keeps the monitor of the given object locked until it goes out of scope.

Templates

NameDescription
haveTypeAlready
isCopyable
IsolatedEncapsulates the given type in a way that guarantees memory isolation.
isStronglyIsolatedDetermines if the given list of types has any non-immutable aliasing outside of their object tree.
isWeaklyIsolatedDetermines if the given list of types has any non-immutable and unshared aliasing outside of their object tree.
ScopedRefEncapsulates a reference in a way that disallows escaping it or any contained references.

Aliases

NameTypeDescription
TidTask
Authors

Sönke Ludwig

Copyright

© 2013-2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.