Im updating my app to be Task based rather than have a Queue and a single thread that services requests on that queue.
What Im doing is on the UI thread I create a task with an action, that start that task. The action of that task will eventually invoke a delegate that will attempt to update the UI, all wrapped nicely in an InvokeOnMainThread. However, Im finding that any code inside the invoke is not being run, and my app just hangs.
Code in the UI thread, inside a generic class I created called Publisher:
Task newTask = new Task(() => SubscriberAdded(sub));
The SubscriberAdded method loads some data in a thread safe manner, then invokes a delegate event that in turn will attempt to invoke on the UI thread to refresh some controls.
Am I using Task correctly? This all looks fairly simple, I don't see why this wouldn't or shouldn't work. I am not using any await code here.