Skip to content

Support automatic size detection of array passed to Task (HAST-322) #112

@Piedone

Description

@Piedone

Passing arrays to Tasks like below currently requires one manually specify the array size (see here):

public void PassArrayToTask()
{
var array = new int[TaskArrayLength];
var tasks = new Task<int>[15];
tasks[0] = Task.Factory.StartNew(
arrayObject =>
{
var localArray = (int[])arrayObject;
localArray[0] = 123;
return localArray[0];
},
array);
}

This should rather be handled automatically.

Then remove the manual array size config in StaticTestInputAssembliesVerificationTests.

Jira issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions