[][src]Function dart_sys::Dart_CreateIsolateGroup

pub unsafe extern "C" fn Dart_CreateIsolateGroup(
    script_uri: *const c_char,
    name: *const c_char,
    isolate_snapshot_data: *const u8,
    isolate_snapshot_instructions: *const u8,
    flags: *mut Dart_IsolateFlags,
    isolate_group_data: *mut c_void,
    isolate_data: *mut c_void,
    error: *mut *mut c_char
) -> Dart_Isolate

Creates a new isolate. The new isolate becomes the current isolate.

A snapshot can be used to restore the VM quickly to a saved state and is useful for fast startup. If snapshot data is provided, the isolate will be started using that snapshot data. Requires a core snapshot or an app snapshot created by Dart_CreateSnapshot or Dart_CreatePrecompiledSnapshot* from a VM with the same version.

Requires there to be no current isolate.

\param script_uri The main source file or snapshot this isolate will load. The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child isolate is created by Isolate.spawn. The embedder should use a URI that allows it to load the same program into such a child isolate. \param name A short name for the isolate to improve debugging messages. Typically of the format 'foo.dart:main()'. \param isolate_snapshot_data \param isolate_snapshot_instructions Buffers containing a snapshot of the isolate or NULL if no snapshot is provided. If provided, the buffers must remain valid until the isolate shuts down. \param flags Pointer to VM specific flags or NULL for default flags. \param callback_data Embedder data. This data will be passed to the Dart_IsolateGroupCreateCallback when new isolates are spawned from this parent isolate. \param error Returns NULL if creation is successful, an error message otherwise. The caller is responsible for calling free() on the error message.

\return The new isolate on success, or NULL if isolate creation failed.