Page 1 of 1

make a http request without render stalls

Posted: 23 May 2014, 17:08
by Stefan Go
Hi Ventuz development Team! I hope you're fine!

I wrote a smal Script in Ventuz to get external data with a http request. It's similar like this:

http://msdn.microsoft.com/de-de/library ... 80%29.aspx

But every time i call the method of the Script Node for the http request the render stalls for some frames. Is there any way to do a async loading of the data like e.g. the movie node does to avoid render stalls? Do you have some example code for that kind of use?

Greetings from the wild event jungle outside! ;)

Stefan Goerke

Re: make a http request without render stalls

Posted: 26 May 2014, 10:05
by Karol
Hi Stephan!

You have to program the async processing in your Script on your own!
There is no general 'Async' mode for the Script node!
A good starting point for async programming is: http://www.albahari.com/threading/
Please note that unhandled exceptions in a thread started from the Script node will crash Ventuz! So be careful!
And AFAIK the HttpWebRequest class has also some async methods.

Best Regards
Karol