abort

How do you cleanly abort a Delphi program?

跟風遠走 提交于 2019-12-18 11:07:12
问题 I've got a program that's having some trouble during shutdown, raising exceptions that I can't trace back to their source. It appears to be timing-related and non-deterministic. This is occurring after all shared resources have been released, and since it's shutdown, memory leaks are not an issue, so that makes me wonder if there's any way to just tell the program to terminate immediately and silently after releasing the shared resources, instead of continuing with the shutdown sequence and

HttpWebResponse: closing the stream

喜你入骨 提交于 2019-12-18 08:59:05
问题 I'm getting the response from an HttpWebRequest (using a modified version Jeff Richter's CCR wrappers), then inspecting a few of the headers in order to decide whether or not to continue the download. Sometimes I might not want to continue, so I consequently issue response.Close and request.Abort. Is it necessary to issue GetResponseStream then to close the stream, or is this implicit when one calls response.Close? After issuing GetResponse, the docs state: You must call the Close method to

Killing a .NET thread

早过忘川 提交于 2019-12-17 01:58:30
问题 I have created a thread running a certain method. But sometimes I would like to kill the thread even if it is still working. How can I do this? I tried Thread.Abort() but it shows up a messagebox saying "Thread aborted". What should I do? 回答1: Do not call Thread.Abort()! Thread.Abort is dangerous. Instead you should cooperate with the thread so that it can be peacefully shut down. The thread needs to be designed so that it can be told to kill itself, for instance by having a boolean keepGoing

Abort HTTP-Request Server process

試著忘記壹切 提交于 2019-12-13 04:34:48
问题 As shown in Abort DoJo XHR-Request it is possible to cancel a (dojo/request/xhr) http request on the Client. The problem is, that the according server process (initiated by the request) is still running. If we use a XMLHttpRequest-Object, calling abort() on it would stop the server process. So the question is: Is it possible to achive this with dojo? Or is it possible to get access to the internal XMLHttpRequest-Object (used by dojo/request/xhr) to call abort() on it? 来源: https:/

Can you tell a php server to abort the execution of a previously running script?

偶尔善良 提交于 2019-12-12 22:32:43
问题 My web page uses an ajax call to return data from a very long php script, so if I exit the page early and reload the page, that php script is still being carried out, which will cause me problems. Is there a way I could tell the server to abort the execution of the previous ajax request, if there is one that's still running? thanks 回答1: Not directly. You will need to set up a scheme where the work is offloaded to an external (to the web server) process, and that process has a communication

Thread Abort in .NET

亡梦爱人 提交于 2019-12-12 11:18:00
问题 I have a thread thats analyzing a file and making transactional calls to the database, each transaction has a audit entry as part of its transaction. Is there anything vastly wrong with calling Thread.Abort() to stop the processing of the file? Rather than scatter ugly safe spots everywhere? The file will be closed after the Abort call. 回答1: The obvious problem would be the risk of abandoning a transaction, which could cause blocking for an indeterminate time (or until timeout). But you could

Uncaught exception in a callback from a 3rd party static library

China☆狼群 提交于 2019-12-12 05:42:41
问题 I am compiling my program with a 3rd party library. That library contains an error callback if an error occurs internally. Inside that error callback I am throwing an exception and I have a unit test to verify that when I do something invalid that the exception is thrown. This all works beautifully in Windows, but when I test this in linux (fedora) I am getting an abort from an uncaught exception. I tried wrapping my call directly with a try-catch block but no luck. ( Also, all my code is

“Abort trap: 6” running C program on a Mac

牧云@^-^@ 提交于 2019-12-12 03:36:32
问题 I have a problem with this program. When I try to run it on my Mac, it returns "Abort trap: 6". I cannot understand the reason. Below is the file contents I used to test the program. aaabccdegags bbbbbbbcados vbaiusbyabtd aisybavsitvc asindvsivati ammaccabanan You should just copy these nonsense strings into a text file file.txt and call it by the command prompt with the syntax: program.exe file.txt r where file.txt includes the nonsense strings and r is the letter it should look for in the

Aborting a Jenkins job from within the executing shell

↘锁芯ラ 提交于 2019-12-12 03:23:50
问题 First some context: Currently I have a Jenkins job setup to run a perl script, that in turns builds source code on whatever machine it is running. From my observation of the Jenkins behaviour, if I abort a running Jenkins job from the UI all the associated threads (single or parallel) of my perl script are killed on the respective slave machine. Now what I would like to replicate that behaviour ie abort a Jenkins job IF during my build step my script produces some errors. Unfortunately I am

Cancel long running download

半世苍凉 提交于 2019-12-12 01:55:55
问题 I have a web application with a PHP server side language on NGINX. Via JS, a user is able to download a file which is constructed dynamically by PHP from a database that is very slow. Therefore, to receive the first bytes for printing takes about 20 seconds. Then, more data is continuously streamed out afterwards. PHP: header("Content-Disposition: attachment; filename=\"" . $filename . ".txt\""); header("Pragma: public"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0");