I make one sample App for Roku. It is as below.
MainScene.brs
sub init()
m.TaskNodeThread = CreateObject("roSGNode", "TaskNodeThread")
m.TaskNodeThread.control = "RUN"
end sub
MainScene.xml
<?xml version="1.0" encoding="UTF-8"?>
<component name="MainScene" extends="Scene" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd">
<script type="text/brightscript" uri="pkg:/components/MainScene.brs" />
</component>
TaskNodeThread.brs
sub init()
m.TestContent = testContentFunction(testData)
end sub
function testContentFunction(testData as String) as String
**'Here I need some calculation and It takes a lot of time.**
**'It takes around 50 to 60 Sec and I got this error in this function.**
**'I know Rendered thread timeout limit is 10 Sec that's why I have written this**
**function in Task Node.**
**'Even so, it waits only for 10 Sec.**
**'Can anyone suggest where should I write this type of logic in Roku which is not**
**affected by UI.**
end function
TaskNodeThread.xml
<?xml version="1.0" encoding="UTF-8"?>
<component name="TaskNodeThread" extends="Task" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd">
<script type="text/brightscript" uri="pkg:/components/TaskNodeThread.brs" />
</component>
