Hi all,
We have created a query system in GH that lets us query objects in multiple streams and returns a list of objects’ URLs. We then need to receive them in GH but we cannot use any of the Recieve
components.
-
The Async Receiver just receives the first objects when provided a list of URLs as the input. Having a glance at the source code, I guess this behavior is by design.
-
The Sync Receiver though has unexpected behavior. if provided a
List
or aDataTree
, the component loops over the input but downloads the first object every time.
In case of the Sync Receiver, this is presumably not the intended behavior, but one thing that is puzzling me a bit is if it was intended to behave like the Async Receiver and receive one object only, or if it was supposed to download a list of objects. The component is TaskCapable
and the input has GH_ParamAccess.item
which makes it loop over the input; but in the SolveInstance
method, there is this line that reads the input only once.
protected override void SolveInstance(IGH_DataAccess DA)
{
if (RunCount == 1)
{
ParseInput(DA);
if (InputType == "Invalid") return;
}
if (InPreSolve)
{
...
Also, since the variables are mostly class variables, I am not sure about the thread safety of the code. Is it something about the SynchronizationContext that I am missing?