December 13, 20178 yr Is the onMessage() executed all the time? Because i noticed some delay before it gets executed. It kinda screws up the flow.
December 13, 20178 yr no its not executed "All the time" it has a small delay in it i assume to not kill your Cpu usage
December 13, 20178 yr 29 minutes ago, dokato said: Is the onMessage() executed all the time? Because i noticed some delay before it gets executed. It kinda screws up the flow. I don't believe it runs on a separate thread, so while your script is doing other things, including sleeping, it won't be executed.
December 13, 20178 yr If you wanted to run it on a separate thread, it probably wouldn't be hard, to be honest. I'd just be very cautious of CPU usage because chances are that there's a reason why the developers would have decided against it.
December 20, 20178 yr well you could always check the last message sent every 50-100ms orso this shoudn't really cause a big increase in cpu usage tbh
Create an account or sign in to comment