vibe.d beta banner
get vibe.d
0.8.1

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

Function async.async

Starts an asynchronous computation and returns a future for the result value.

Future!(ReturnType!CALLABLE) async (
  CALLABLE callable,
  ARGS args
);

If the supplied callable and arguments are all weakly isolated, runWorkerTask will be used to perform the computation. Otherwise, runTask will be used.

Parameters

NameDescription

callable

A callable value, can be either a function, a delegate, or a user defined type that defines an opCall.

args

Arguments to pass to the callable.

Returns

Returns a Future object that can be used to access the result.

See also

isWeaklyIsolated

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.