How user-interface thread knows the animation thread has finished?
-
I have a control which does some animation. The animation (as far as I know) is on different thread. An event occurs and the control starts to animate, no problem. While it is animation it gets another request which I do not want and second request has to wait until it finished its first. I thought I place static bool and check it is previously animating and change vale when animation is comleated. This does not work because when context switch changes static bool has meaningless value. Now I have to protect static bool so context switch should not effect. It is long way to do so and it might not work. I haven’t tried either. Do you any better idea? Your help will be very much appreciated. Best regards Agha Khan
-
I have a control which does some animation. The animation (as far as I know) is on different thread. An event occurs and the control starts to animate, no problem. While it is animation it gets another request which I do not want and second request has to wait until it finished its first. I thought I place static bool and check it is previously animating and change vale when animation is comleated. This does not work because when context switch changes static bool has meaningless value. Now I have to protect static bool so context switch should not effect. It is long way to do so and it might not work. I haven’t tried either. Do you any better idea? Your help will be very much appreciated. Best regards Agha Khan
inject the thread , and kill it.