https://bugzilla.novell.com/show_bug.cgi?id=690944

https://bugzilla.novell.com/show_bug.cgi?id=690944#c0


           Summary: TPL cannot use main UI thread TaskScheduler
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


Created an attachment (id=427357)
 --> (http://bugzilla.novell.com/attachment.cgi?id=427357)
Project file demoing bug

Description of Problem:

In order to run some code off the UI thread, and some on, the TaskScheduler
"TaskScheduler.FromCurrentSynchronizationContext()" is used with a ContinueWith
of the background task.

However, either ContinueWith is broken or the UI TaskScheduler is broken
because such synchronized tasks end up executing on the background thread
instead of the main UI thread.

Steps to reproduce the problem:

            var t = Task.Factory.StartNew(() => {
                return 42;
            });

            t.ContinueWith((r) => {

                // DO UI WORK ON UI THREAD

            }, TaskScheduler.FromCurrentSynchronizationContext());


There is an attached project that demos this bug. Watch the console output.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to