RemoteAPI.spawn

Instantiate a node and start it

This is usually called from the main thread, which will start all the nodes and then start to process request. In order to have a connected network, no nodes in any thread should have a different reference to the same node. In practice, this means there should only be one Tid per "address".

Note: When the RemoteAPI returned by this function is finalized, the child thread will be shut down.

class RemoteAPI(API, alias S = VibeJSONSerializer!())
static
spawn
(
Impl
)
(
CtorParams!Impl args
,
Duration timeout = 5.seconds
,
string file = __FILE__
,
int line = __LINE__
)

Parameters

Impl

Type of the implementation to instantiate

args CtorParams!Impl

Arguments to the object's constructor

timeout Duration

(optional) timeout to use with requests

file string

Path to the file that called this function (for diagnostic)

line int

Line number tied to the file parameter

Return Value

Type: RemoteAPI

A RemoteAPI owning the node reference

Meta