Method ScheduleConstruct
ScheduleConstruct<T>(out UnsafeStream, NativeList<T>, JobHandle, AllocatorHandle)
Creates and schedules a job to allocate a new stream.
Declaration
public static JobHandle ScheduleConstruct<T>(out UnsafeStream stream, NativeList<T> bufferCount, JobHandle dependency, AllocatorManager.AllocatorHandle allocator) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| UnsafeStream | stream | Outputs the new stream. |
| NativeList<T> | bufferCount | A list whose length determines the number of buffers in the stream. |
| JobHandle | dependency | A job handle. The new job will depend upon this handle. |
| AllocatorManager.AllocatorHandle | allocator | The allocator to use. |
Returns
| Type | Description |
|---|---|
| JobHandle | The handle of the new job. |
Type Parameters
| Name | Description |
|---|---|
| T | Ignored. |
Remarks
The stream can be used on the main thread after completing the returned job or used in other jobs that depend upon the returned job.
Using a job to allocate the buffers can be more efficient, particularly for a stream with many buffers.
ScheduleConstruct(out UnsafeStream, NativeArray<int>, JobHandle, AllocatorHandle)
Creates and schedules a job to allocate a new stream.
Declaration
public static JobHandle ScheduleConstruct(out UnsafeStream stream, NativeArray<int> bufferCount, JobHandle dependency, AllocatorManager.AllocatorHandle allocator)
Parameters
| Type | Name | Description |
|---|---|---|
| UnsafeStream | stream | Outputs the new stream. |
| NativeArray<int> | bufferCount | An array whose value at index 0 determines the number of buffers in the stream. |
| JobHandle | dependency | A job handle. The new job will depend upon this handle. |
| AllocatorManager.AllocatorHandle | allocator | The allocator to use. |
Returns
| Type | Description |
|---|---|
| JobHandle | The handle of the new job. |
Remarks
The stream can be used on the main thread after completing the returned job or used in other jobs that depend upon the returned job.
Allocating the buffers in a job can be more efficient, particularly for a stream with many buffers.