No announcements
Found 848418 threads
-
0 Votes
Cancelling Running Task without Async and Await
You could put the tasks and cancellation source in static variables.Answered | 4 Replies | 389 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
how to cancle a async method with no CancellationToken parameter
Hi z99z- If an async method doesn't expose an overload that accepts a CancellationToken, it's not cancelable.Answered | 1 Replies | 5645 Views | Created by z99z - Monday, November 15, 2010 9:21 PM | Last reply by Stephen Toub - MSFT - Tuesday, November 16, 2010 1:17 AM -
1 Votes
Passing many CancellatIonToken to method returning Task
As an example, it sounds like you have two methods, where async method A is an outer async method that accepts a CancellationToken from a user, and then ...Answered | 3 Replies | 8654 Views | Created by sergunok - Friday, January 14, 2011 2:04 PM | Last reply by JoeM WA - Monday, April 11, 2011 6:14 AM -
0 Votes
good way to cancel async method
And when that exception escapes from the async method it was thrown in, the task that was returned from that async method will be canceled.Answered | 7 Replies | 6517 Views | Created by sergunok - Monday, January 10, 2011 2:30 PM | Last reply by sergunok - Thursday, January 13, 2011 11:07 AM -
0 Votes
Cancel the Task
See the documentation with ...Answered | 1 Replies | 702 Views | Created by lctk - Thursday, August 9, 2018 4:51 AM | Last reply by Kareninstructor - Thursday, August 9, 2018 10:19 AM -
2 Votes
Stream.ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) does not cancel
If the FileStream is constructed with a parameter that informs it to use async I/O, then it will do so, and the async reads/writes will be cancelable.Answered | 4 Replies | 7084 Views | Created by Vladimir Perevalov - Sunday, April 15, 2012 8:16 AM | Last reply by Stephen Toub - MSFT - Tuesday, April 17, 2012 2:52 PM -
0 Votes
How to cancel a task operation
It's hard to tell you how exactly should your code look without seeing your actual class structure.Answered | 6 Replies | 3115 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
Returning result from canceled task
All operation canceled exceptions are translated into the returned task being canceled, and the exception gets thrown away.Answered | 5 Replies | 4787 Views | Created by sergunok - Monday, February 14, 2011 7:20 AM | Last reply by Stephen Toub - MSFT - Tuesday, February 15, 2011 5:17 AM -
0 Votes
Await and Canceled Task
and later cancelled (e.g. due to heavy workload).Answered | 12 Replies | 13595 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
How to pass a CancellationToken to a C++/CLI task
The same goes for PLINQ and Tasks, e.g. if you have a Task to which you provided a cancellation token, cancellation being requested may prevent that ...Answered | 3 Replies | 9883 Views | Created by Fernando Cacciola - Wednesday, July 6, 2011 11:23 PM | Last reply by Stephen Toub - MSFT - Monday, July 18, 2011 2:30 PM -
0 Votes
Cancelling an async task without a CancellationToken
findLocationCancellationSource.IsCancellationRequested) { findLocationCancellationSource.Cancel(); result = true; } return ...Answered | 1 Replies | 1902 Views | Created by DJoneda1 - Sunday, September 28, 2014 9:27 AM | Last reply by Vishal Kaushik - Monday, September 29, 2014 6:17 AM -
0 Votes
Unable to Cancel tasks using Cancellation Token in TPL
I need some help on how to handle the AggregationException and Cancelling the tasks.Answered | 2 Replies | 1693 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
Can I propagate cancellation without throwing task cancelled exceptions?
Hi Strilanc- The only way to cancel the Task returned from an async method in C#/VB is to throw an OperationCanceledException (or any exception type that ...Answered | 1 Replies | 4803 Views | Created by Strilanc - Monday, July 16, 2012 7:43 PM | Last reply by Stephen Toub - MSFT - Friday, August 24, 2012 5:44 AM -
4 Votes
Cancelling a task and TaskCancelException
I expect to use tasks and cancellations in many different projects supporting customers.Answered | 5 Replies | 6331 Views | Created by Christian Nagel - Tuesday, July 21, 2009 1:21 PM | Last reply by Christian Nagel - Tuesday, July 21, 2009 8:18 PM -
1 Votes
Cancel the task
Only you know when and how your task can be cancelled, so you will have to write the code to check that and cancel out.Answered | 5 Replies | 3053 Views | Created by NMG1852951 - Thursday, April 12, 2012 6:35 AM | Last reply by Rob Caplan [MSFT] - Thursday, April 19, 2012 10:02 PM -
0 Votes
Cancelling a Task out of Several tasks
and passing the cancellation token source to the task itself is the key to achieve this self-destruction method.Answered | 4 Replies | 5280 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
Async and Wait
Is there Microsoft documentation explaining how async methods use tasks internally?Answered | 5 Replies | 1119 Views | Created by MrSnert - Tuesday, April 2, 2019 11:38 AM | Last reply by MrSnert - Wednesday, April 10, 2019 10:34 AM -
0 Votes
CancellationToken in window service
I have implemented there CancellationToken with Async and await. it is working fine when we are trying to access it using web application but the same code when i am trying to ...Answered | 2 Replies | 1429 Views | Created by Rajesh.Jha153 - Thursday, February 18, 2016 11:51 AM | Last reply by Kristin Xie - Friday, February 19, 2016 8:56 AM -
1 Votes
TPL - Cancelling child tasks
Sorry, I marked without proper analyzing :).Answered | 4 Replies | 7432 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 -
1 Votes
task.wait on a async task does not wait
But I'm seeing type of t2 as Task and so I could not cast it to Task<Task>.Answered | 2 Replies | 4989 Views | Created by wlf2k2 - Monday, February 13, 2012 11:54 PM | Last reply by wlf2k2 - Tuesday, February 14, 2012 9:44 PM - Items 1 to 20 of 848418 Next ›
No announcements