No announcements
Found 3491048 threads
-
0 Votes
Unable to Cancel tasks using Cancellation Token in TPL
I figured out the issue - I was not passing the cancellation token to the Delegate Method. after the change, it works.Answered | 2 Replies | 1883 Views | Created by Rajeshlh - Wednesday, January 30, 2013 9:04 PM | Last reply by Bob Shen - Thursday, January 31, 2013 7:05 AM -
1 Votes
TPL - Cancelling child tasks
Task t2 could be cancelled after the execution in metod Task1 completes and ThrowIfCancelltionRequested wouldn`t help.Answered | 4 Replies | 7638 Views | Created by x_Xander_x - Thursday, February 17, 2011 7:33 AM | Last reply by Shyam Maggo - Monday, April 23, 2012 7:59 PM -
9 Votes
Task.Factory.StartNew cancellation token parameter
This has two primary benefits: 1) If the token has cancellation requested prior to the Task starting to execute, the Task won't execute.Answered | 5 Replies | 49188 Views | Created by Vitaly Dilmukhametov - Wednesday, February 17, 2010 9:11 AM | Last reply by cuipengfei - Tuesday, April 12, 2011 5:05 AM -
0 Votes
Cancelling a Task out of Several tasks
Sure, you can create the timed cancellation token once the task starts running, passing that token down to any called functions.Answered | 4 Replies | 5507 Views | Created by Tamer Yousef - Wednesday, November 24, 2010 4:19 PM | Last reply by Tamer Yousef - Tuesday, December 7, 2010 6:38 PM -
1 Votes
Multi-Threading Cross-Class Cancellation with TPL
I was aware abotu the Wait() I was using it for testing.Answered | 7 Replies | 4798 Views | Created by Camuvingian - Monday, May 14, 2012 2:13 PM | Last reply by Camuvingian - Thursday, May 24, 2012 4:54 PM -
1 Votes
Cancel the task
The cancellation token is a request for the task to cancel.Answered | 5 Replies | 3291 Views | Created by NMG1852951 - Thursday, April 12, 2012 6:35 AM | Last reply by Rob Caplan [MSFT] - Thursday, April 19, 2012 10:02 PM -
4 Votes
Cancelling a task and TaskCancelException
I expect to use tasks and cancellations in many different projects supporting customers.Answered | 5 Replies | 6497 Views | Created by Christian Nagel - Tuesday, July 21, 2009 1:21 PM | Last reply by Christian Nagel - Tuesday, July 21, 2009 8:18 PM -
3 Votes
cancelling a task, two questions
First, the Task will eventually start executing regardless of whether cancellation was requested before the thread pool got around to processing it; if you pass the ...Answered | 1 Replies | 6211 Views | Created by Frédo - Wednesday, November 28, 2012 9:28 AM | Last reply by Stephen Toub - MSFT - Wednesday, November 28, 2012 3:41 PM -
0 Votes
Using Cancellation Token
This cancellation exception is the way that a Running Task acknowledges a cancellation request, so you're supposed to let it escape the method.Answered | 1 Replies | 8638 Views | Created by icilla - Friday, June 3, 2011 7:45 PM | Last reply by Danny Shih - Wednesday, June 8, 2011 9:23 PM -
0 Votes
How to cancel a task operation
If you're using Tasks, database work should run on a background thread and then you should populate the collection on the UI thread.Answered | 6 Replies | 3334 Views | Created by Serge Calderara - Friday, January 18, 2013 1:56 PM | Last reply by Serge Calderara - Saturday, January 19, 2013 8:05 AM -
0 Votes
Cancel the Task
See the documentation with ...Answered | 1 Replies | 953 Views | Created by lctk - Thursday, August 9, 2018 4:51 AM | Last reply by Kareninstructor - Thursday, August 9, 2018 10:19 AM -
1 Votes
Cancellation Framework in Beta 2 (CancellationTokenSource and Token)
We also figured that the token would be in scope (and accessible to the Task delegate) for most scenarios, and on the occasion that it's not, the state object can be ...Answered | 2 Replies | 6501 Views | Created by Marc A. Zhou - Friday, October 23, 2009 8:42 AM | Last reply by Danny Shih - Saturday, October 24, 2009 1:58 AM -
0 Votes
How is a canceled ContinueWith task treated by the finalizer?
A typical mistake is forgetting to pass the cancellation token to theStartNew method.Answered | 10 Replies | 5868 Views | Created by xor88 - Wednesday, December 7, 2011 2:03 PM | Last reply by xor88 - Friday, December 9, 2011 9:12 AM -
1 Votes
Cancelling one of the concurrently executed methods
Hi Srivignesh, You can try this using "Task Parallel Library" (TPL) to achieve this.Answered | 2 Replies | 724 Views | Created by Srivignesh Jaganathan - Friday, December 6, 2013 12:32 PM | Last reply by S.Sriram - Thursday, December 12, 2013 6:59 AM -
2 Votes
Aborting a long running task in TPL
For example, in the sample app if I cancel task '1' prior to task '0' completing, task '2' will fire anyways.Answered | 4 Replies | 30005 Views | Created by Andrew W Anderson - Thursday, January 20, 2011 3:49 PM | Last reply by chojrak - Friday, January 27, 2012 4:05 PM -
0 Votes
How to cancel the operation performed in the Task
Thank you for your help, I think I probably understand a little bit, Token passing to a class of judgment in the process of uploading, or corresponding upload upload function to add a ...Answered | 2 Replies | 1163 Views | Created by 大傻蛋啊 - Tuesday, March 26, 2013 9:42 AM | Last reply by 大傻蛋啊 - Wednesday, March 27, 2013 2:46 AM -
3 Votes
httpclient "a task was canceled!
>” I also confirmed that my new code now being async and using TPL instead of threading is able to spin up requests much faster.Answered | 10 Replies | 8553 Views | Created by DanBayley - Sunday, May 22, 2016 1:12 PM | Last reply by Albert_Zhang - Friday, June 3, 2016 5:46 AM -
0 Votes
Await and Canceled Task
using System; using System.Threading.Tasks; using System.Threading; namespace CSharpConsole { ...Answered | 12 Replies | 14025 Views | Created by Vlada Bodecek - Tuesday, November 2, 2010 6:22 PM | Last reply by Robert8399 - Saturday, December 4, 2010 1:00 AM -
0 Votes
Cancelling Running Task without Async and Await
The newer examples tend to use Task instead of Thread.Answered | 4 Replies | 592 Views | Created by ID GO - Monday, November 14, 2016 2:22 PM | Last reply by chilberto - Monday, November 14, 2016 9:19 PM -
0 Votes
entity framework cancel long running query
Such as ToListAsync which accepts a cancelation token.Answered | 1 Replies | 6164 Views | Created by bobragland - Tuesday, October 9, 2012 1:23 PM | Last reply by Glenn Condron - Tuesday, October 9, 2012 8:15 PM - Items 1 to 20 of 3491048 Next ›
No announcements