Questions tagged [cancellation]

Cancellation is paradigm that allows cooperatively canceling a running operation before it finishes.

Cancellation is paradigm that allows cooperatively canceling a running operation before it finishes.

In , cancellation is achieved using for signaling cancellation and a CancellationToken is used by the operation to check whether cancellation was requested.

712 questions
-1
votes
1 answer

Is there any way to cancel removal order using amazon MWS API?

I want to cancel the removal order through MWS API. But I didn't found any information to cancel removal order using MWS api. Then i found removal orders are setup the same as customer orders. So,I just tried FeedType(but getting error in Get Feed…
JankiWebs
  • 1
  • 1
-1
votes
1 answer

Is this way of using Task cancellation before closing port correct?

I have a C# GUI application where when one clicks on a button and then MyMethod starts running async way and it continuously(inside a do while loop) calls MyTask. MyTask writes and reads data from a port. And these data is passed to MyProgressMethod…
pnatk
  • 121
  • 1
  • 7
-1
votes
1 answer

When (how quickly) is a golang child function cancelled when cancelFunc() is called?

I want to access Redis and do a GET on two machines simultaneously. I'll use the first result I get and cancel the other call. What I'm wondering is whether cancelFunc() breaks a go function immediately or whether it will wait for a specific event…
Alexis Wilke
  • 19,179
  • 10
  • 84
  • 156
-1
votes
1 answer

Interrupt or cancel a long computation in DLL

I'm developing an SDK as a dynamic library (DLL/so). The user can set a lot of parameters prior to run the computation. But I would like to offer a way to dynamically change the parameters, which should stop the current computation and relaunch it…
Vuwox
  • 2,331
  • 18
  • 33
-1
votes
1 answer

Coding noise cancellation in matlab

This is a program I found online. It's supposed to take an audio file from the folder, add noise and then filter it out. However, ha=dsp.LMSFilter(256,mu); is wrong and how to add the correct arguments to dsp.LMSFilter(), I have no idea. Alos, I…
-1
votes
1 answer

Low performance on TaskCanceledException

I need to run many (10-100k) convertation operations in parallel. In this case I use tasks, SymaphoreSlim to control degree of parallelism and CancellationTokenSource to prevent not running tasks to run when exception is thrown. I'm trying to do…
-1
votes
1 answer

Cancel cURL request

I would like to cancel a cURL request. The request should be cancelled when the user is leaving the page. Explanation of the situation: we're sending a cURL request to a mobile payment terminal to start a new payment. The request is still pending…
Stefan
  • 249
  • 5
  • 17
-1
votes
1 answer

VB.NET Cancel execution of a long running, blocking method within a Task?

I am trying to cancel a task which contains a long running, blocking method call. My problem is that execution does not return to the caller until the long running operation is completed. (Even if it has been cancelled.) Public Class DebugForm …
JohnWick
  • 4,929
  • 9
  • 37
  • 74
-1
votes
2 answers

How to block other promises after one finished

I have a list of asynchronous functions. I expected when the very first function resolve (or reject), I can stop others. For examples: function wait(ms){ return new Promise(function(resolve){ setTimeout(function(){ …
Khanh Le
  • 404
  • 4
  • 18
-1
votes
1 answer

Using await Task.Delay() with Cancellation token to time out a method

I am looking at a method that is structured like the code below. What is the effect of the cancellation token? Is it so that if the calculation takes longer than 1 second it won't return a T and it throws an error? public async Task
noah
  • 2,616
  • 13
  • 27
-1
votes
3 answers

Run method Safe cancellation?

I want to call a function in a different thread than my GUI. I used the below code to trigger the function: private void button1_Click(object sender, EventArgs e) { tokensource = new CancellationTokenSource(); var token = tokensource.Token; …
Masoud
  • 101
  • 4
-1
votes
2 answers

Stop a notification using swift 3

I have a problem which involves stopping a local notification. This stop button is that so if the user starts a timer (a notification pops up once the timer runs out) and then decides they no longer need the timer, they can cancel it. The problem…
imjonu
  • 515
  • 1
  • 6
  • 12
-1
votes
1 answer

Node promises: use first/any result (Q library)

I understand using the Q library it's easy to wait on a number of promises to complete, and then work with the list of values corresponding to those promise results: Q.all([ promise1, promise2, . . . …
Gershom Maes
  • 7,358
  • 2
  • 35
  • 55
-1
votes
1 answer

Conway's Game of Life, Element-by-Element Multiplication and a condition cancellation

Good afternoon. I'm working on a "Conway's Game of Life" simulation in Matlab. Being as I am not the best in the world at Matlab, I did a lot of research and read up as much as I could on different techniques to attack this problem. Conway's game…
-1
votes
1 answer

The handle is invalid - Cancellation token source

once upon a time when calling CancellationTokenSource Cancel() method I am getting an exception: The handle is invalid. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.Threading.EventWaitHandle.Set() at…
MistyK
  • 6,055
  • 2
  • 42
  • 76
1 2 3
47
48