AsyncComponent in cluster returns null when switching documents

Hi,

We use the GH_AsyncComponent for many of our components to make them work asynchronously. We have now discovered an issue with placing these components inside of clusters, and I think it comes down to the GH_AsyncComponent.

The issue occurs either when opening the GH document and when leaving the cluster. When doing this, what is returned from the async component is null, as you can see below. The a output is just a simple operation using the Python component to make sure that the cluster is triggered and actually performs the computation as I leave the cluster. If I trigger the computation again while I’m on the main canvas, it does return what I expect, as seen in the picture on the right.

When debugging, there appears to be no issue, as we reach the end of DoWork and call Done(). However, when this issue occurs, SetData is not called for some reason.

Do you also know if you have this issue on your end with components that use the async base component? I was thinking at first that it was an issue on our end, but I’m not sure.

Hey @knut.tjensvoll ,

Thanks for the report! I’m afraid that’s a limitation of how the AsyncComponent works - in order to simulate an async behavior, it needs to run twice behind the scenes, and this is probably not triggered correctly in a cluster.

I’ll let @AlanRynne reply with more context once he’s back from holiday.