[Mono-bugs] [Bug 690944] New: TPL cannot use main UI thread TaskScheduler
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Apr 29 14:16:31 EDT 2011
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: mono-bugs at lists.ximian.com
ReportedBy: fak at kruegersystems.com
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list