Forum Xamarin.Android

How to stop ThreadPool.QueueUserWorkItem?

Hello everyone.

I'm using the function ThreadPool.QueueUserWorkItem to retrieve frames continuously from an external device and printing them on screen as they are ready to display. This runs on a function that contains an infinite loop. Obviously, this loop can't keep running once the activity is no longer being used, but I can't find the way to stop the worker thread once the activity is being abandoned.

Any suggestions?

Best Answer


Sign In or Register to comment.