Skip to content

Commit

Permalink
Refactors AlgorithmPythonWrapper.OnFrameworkData
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCatarino committed Oct 16, 2019
1 parent d55eaae commit 7865516
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions AlgorithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -560,16 +560,9 @@ public void OnData(Slice slice)
/// <param name="slice">The current data slice</param>
public void OnFrameworkData(Slice slice)
{
if (SubscriptionManager.HasCustomData)
{
using (Py.GIL())
{
_algorithm.OnFrameworkData(new PythonSlice(slice));
}
}
else
using (Py.GIL())
{
_algorithm.OnFrameworkData(slice);
_algorithm.OnFrameworkData(SubscriptionManager.HasCustomData ? new PythonSlice(slice) : slice);
}
}

Expand Down

0 comments on commit 7865516

Please sign in to comment.