Compare commits
4 Commits
v2.0.1-alpha.1
...
v2.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
| dafebf5b03 | |||
| e3f4fb07dc | |||
| 89cd7fff62 | |||
| 63649cd9a7 |
@@ -36,20 +36,12 @@
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<!-- Ingored warnings, some aspirational but too noisy for now, some by design. -->
|
||||
<NoWarn>
|
||||
<!--Disabled by design-->
|
||||
CA5399;CA1812;
|
||||
<!--XML comment-->
|
||||
CS1591;CS1573;
|
||||
<!-- Globalization rules -->
|
||||
CA1303;CA1304;CA1305;CA1307;CA1308;CA1309;CA1310;CA1311;
|
||||
<!-- Logging -->
|
||||
CA1848;CA1727;
|
||||
<!-- Others we don't want -->
|
||||
CA1815;CA1725;
|
||||
<!-- Naming things is hard enough -->
|
||||
CA1710;CA1711;CA1720;CA1724;
|
||||
<!-- Aspirational -->
|
||||
CA1502;CA1716;NETSDK1206;
|
||||
$(NoWarn)
|
||||
</NoWarn
|
||||
>
|
||||
|
||||
@@ -177,7 +177,7 @@ public abstract class GH_AsyncComponent<T> : GH_Component, IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SolveInstance(IGH_DataAccess da)
|
||||
protected override void SolveInstance(IGH_DataAccess DA)
|
||||
{
|
||||
//return;
|
||||
if (_state == 0)
|
||||
@@ -191,10 +191,10 @@ public abstract class GH_AsyncComponent<T> : GH_Component, IDisposable
|
||||
// Add cancellation source to our bag
|
||||
var tokenSource = new CancellationTokenSource();
|
||||
|
||||
var currentWorker = BaseWorker.Duplicate($"Worker-{da.Iteration}", tokenSource.Token);
|
||||
var currentWorker = BaseWorker.Duplicate($"Worker-{DA.Iteration}", tokenSource.Token);
|
||||
|
||||
// Let the worker collect data.
|
||||
currentWorker.GetData(da, Params);
|
||||
currentWorker.GetData(DA, Params);
|
||||
|
||||
var currentRun = new Task<Task>(
|
||||
async () =>
|
||||
@@ -226,7 +226,7 @@ public abstract class GH_AsyncComponent<T> : GH_Component, IDisposable
|
||||
if (_workers.Count > 0)
|
||||
{
|
||||
Interlocked.Decrement(ref _state);
|
||||
_workers[_state].Instance.SetData(da);
|
||||
_workers[_state].Instance.SetData(DA);
|
||||
}
|
||||
|
||||
if (_state != 0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup Label="Compiler Properties">
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<TargetFrameworks>net462;net48</TargetFrameworks>
|
||||
<RootNamespace>GrasshopperAsyncComponent</RootNamespace>
|
||||
<AssemblyName>GrasshopperAsyncComponent</AssemblyName>
|
||||
</PropertyGroup>
|
||||
@@ -20,10 +20,18 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Label="Package References">
|
||||
<PackageReference Include="Grasshopper" Version="7.4.21078.1001" IncludeAssets="compile;build" PrivateAssets="all" />
|
||||
<PackageReference Include="PolySharp" Version="1.14.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net462'">
|
||||
<PackageReference Include="Grasshopper" Version="6.28.20199.17141" IncludeAssets="compile;build" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net48'">
|
||||
<PackageReference Include="Grasshopper" Version="7.4.21078.1001" IncludeAssets="compile;build" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user