jlbun
    Preparing search index...

    Class JuliaTask

    Wrapper for Julia Tasks.

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    canReschedule: boolean
    ptr: Pointer
    scheduled: boolean

    Accessors

    • get value(): Promise<JuliaValue>

      Schedule a JuliaTask and get a Promise representing the result of the task.

      Returns Promise<JuliaValue>

    Methods

    • Designate a JuliaTask to the specified thread.

      Parameters

      • threadId: number

        The desired thread ID this task should be designated to.

      Returns JuliaTask

    • Wrap a 0-arg JuliaFunction as a JuliaTask. To use functions with more arguments, first wrap them with Julia.wrapFunctionCall.

      Parameters

      Returns JuliaTask

      Wrap sum([1, 2, 3]) as a JuliaTask:

      const func = Julia.wrapFunctionCall(
      Julia.Base.sum,
      {},
      new Int32Array([1, 2, 3]),
      );
      const task = JuliaTask.from(func);
      const result = await task.value;