I have problem with threads on cpp target. I have to use UdpSocket (fine works with https://github.com/andyli/hxudp) and play video (with https://github.com/soywiz/haxe-openfl-webm). When I receive useful data, video on background plays pretty good. But when there is no data to receive, video and everything else freeze. Cant understand what should I do. I tried to create threads inside of webm library, but it does not work correctly. Sys.sleep() inside of while loop of receiving data does not give me wanted result too.