"destruk" wrote:
I think the main question I have that would be useful to answer for everybody is - json and xml feeds are downloaded using rourltransfer inside a task node. The task thread does that just fine.
Now once it downloads the data completely we throw the result to the "content" interface which is specified as a string type for the field in the task node xml which makes it accessible to the main thread. I've been doing it this way because of the note on thread rendevous between the main thread and the task thread being super slow, so by grabbing the text string in the main thread and parsing it there and then assigning or building the content to populate the screen with is much faster.
What "note on thread rendezvous [...] being super slow"? Please point a source - is this in the documentation or forum folklore?
I did try running the parse inside the task thread and that part appears to be just as fast as running a single command for parse in the main thread.
However, if I want the task node itself to assign and build the content nodes once the string has been parsed for the data it needs to do that, how can we move, copy, reference, or otherwise get that data to the main render thread to populate the screen? Nodes created inside a task node are owned and controlled by that task node, we can't change the content field of the task node to be an object type to make it available to the main render thread? How else would we do it besides sending the string to the main thread to do that part?
Please don't say "main" anywhere near "render" thread - it is confusing (me, you, everyone) ;). The render thread has one job - painting the UI, that does not make it main. You can pass simple types, arrays, dictionaries, nodes just fine between a task and render thread. If i remember there were some rules which thread "owns" nodes (something like visual nodes are always owned by the render thread, where Node and ContentNode belong to the creator but can change ownership on assignment or such) - that does not mean another thread cannot access them though, just that rendezvous would be used under the hood