abort

Declaration of void abort() throws different exceptions

試著忘記壹切 提交于 2019-12-22 10:26:50
问题 I am trying to write some C++ code (using the C++ API) for Festival and am getting stuck while trying to compile. Here is how I invoke g++ : g++ -Wall -pedantic -I../ -I../speech_tools/include/ helloFestival.C -o h -L../festival/src/lib/libFestival.a -L../speech_tools/lib/libestools.a -L../speech_tools/lib/libestbase.a -L../speech_tools/lib/libeststrings.a |& tee festival.runLog The error I get is: In file included from ../speech_tools/include/EST.h:48, from ../festival/src/include/festival.h

Quick successful exit from C++ with lots of objects allocated

有些话、适合烂在心里 提交于 2019-12-22 06:56:08
问题 I'm looking for a way to quickly exit a C++ that has allocated a lot of structures in memory using C++ classes. The program finishes correctly, but after the final "return" in the program, all of the auto-destructors kick in. The problem is the program has allocated about 15GB of memory through lots of C++ class structures, and this auto-destruct process takes about 1 more hour itself to complete as it walks through all of the structures - even though I don't care about the results. The

MessageBox “Abnormal program termination” keeps my application running

北战南征 提交于 2019-12-22 05:09:10
问题 ...kind of. As illustrated by this extremely simplistic example, very rarely (only once reported so far), it happens that one of my applications crashes this way. I want to terminate it as I normally do when an unspecific exception occurs. My strategy is to (low-level) log the problem, then terminate. The application is part of a subsystem and I want to (re)start it, if any problem is detected. It's built with C++-Builder 6 and runs on Windows (XP...7, also 8). I learned that an abort() most

Abort a multiple file upload AJAX request

自作多情 提交于 2019-12-20 14:35:11
问题 I am trying to abort a multiple file upload with a progress bar, showing the state of the process. What I want to achieve is to completely abort the multiple file upload on the abort button click; to stop the progress bar as well as to clear every file(s) that might have been uploaded during the course of the initially triggered multiple file upload process. Below is my code: var AJAX = $.ajax({ xhr: function() { var XHR = new window.XMLHttpRequest(); XHR.upload.addEventListener('progress',

How do I pass CancellationToken across AppDomain boundary?

ⅰ亾dé卋堺 提交于 2019-12-20 10:36:13
问题 I have a command object, doing work based on a request from a request queue. This particular command will execute its work in a child appdomain. Part of doing its work in the child appdomain involves blocking on a ConcurrentQueue operation (eg, Add or Take). I need to be able to propagate an abort signal through the request queue, across to the child appdomain, and to wake up the worker threads therein. Therefore, I think I need to pass a CancellationToken across the AppDomain boundary. I

PHP doesn't detect connection abort at all

天涯浪子 提交于 2019-12-20 01:59:15
问题 I have read and deeply understood these: http://www.php.net/manual/en/features.connection-handling.php http://www.php.net/manual/en/function.register-shutdown-function.php However, I have tested both PHP 5.1.6 and 5.3 and things DON'T work as described there. What I observe is: connection_status() always return true, even after the client has closed the connection. execution of the script keeps going on after the client has closed the connection, even though ignore_user_abort is 0 a function

How to cancel evaluating a required Ruby file?

最后都变了- 提交于 2019-12-19 14:06:28
问题 file1 requires file2 , and I want to be able to cancel evaluating file2 under certain conditions without exiting the whole process. # file1.rb puts "In file 1" require 'file2' puts "Back in file 1" # file2.rb puts "In file 2" # return if some_conditional puts "Still in file 2" When running file1 , the output I want to see is: In file 1 In file 2 Back in file 1 The goal is for Still in file 2 to never print, while Back in file 1 does print. Is there anything I can do in file2 to make this

How to cancel evaluating a required Ruby file?

拥有回忆 提交于 2019-12-19 14:06:03
问题 file1 requires file2 , and I want to be able to cancel evaluating file2 under certain conditions without exiting the whole process. # file1.rb puts "In file 1" require 'file2' puts "Back in file 1" # file2.rb puts "In file 2" # return if some_conditional puts "Still in file 2" When running file1 , the output I want to see is: In file 1 In file 2 Back in file 1 The goal is for Still in file 2 to never print, while Back in file 1 does print. Is there anything I can do in file2 to make this

XHR abort doesn't stop file uploading

最后都变了- 提交于 2019-12-19 10:47:30
问题 I've made an XHR-based file uploader with progressbar, and I would like to add a feature to cancel the upload before it fully uploaded. The simlified code (runs after DOM ready): var xhr; $('#upload').click(function(){ var file = $('#file').get(0).files[0]; xhr = new XMLHttpRequest(); xhr.upload.onprogress = function(event){ if (event.lengthComputable){ var percent = event.loaded / event.total; $('#uploadpercent').html(Math.round(percent * 100) + "%"); } }; xhr.abort = function(){ console.log

Windows Form Application, Thread won't stop

末鹿安然 提交于 2019-12-19 04:59:14
问题 I am using Windows Form application for my thread demo. When I click on button1 ,It will start the thread and recursively doing a work. Here the Form will not hang as I expected. I want to Stop the currently running thread when I click on Button2. However this won't work. private void button1_Click(object sender, EventArgs e) { t = new Thread(doWork); // Kick off a new thread t.Start(); } private void button2_Click(object sender, EventArgs e) { t.Abort(); } static void doWork() { while (true)