Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

StopAll


  • Please log in to reply
23 replies to this topic
adabo
  • Members
  • 385 posts
  • Last active: Jul 30 2015 07:52 PM
  • Joined: 13 May 2010

so again i ask the same question Ace_coder implied
is there somer eason not to use pause?

Because the point of stop-all is to exit the thread, not pause it.

Very New
  • Guests
  • Last active:
  • Joined: --
I achieve the same thing in my single simple script using Reload, as it stops all threads in my script.
F10::
loop
{
send a
}
Return

Esc::
Reload
I'm not sure whether this is bad practice or dangerous, as I am a complete novice, but it works for me.

Jamie
  • Members
  • 129 posts
  • Last active: Dec 02 2012 04:59 AM
  • Joined: 26 Mar 2010
I too use Reload, usually to recover from a misbehaving script. Even if it's not stuck in an infinite loop, it might be going down a wrong path and I want to stop it.

The downside to Reload is that it wipes the global variables and re-executes the autoexecute section. For me this is not a big deal but I can imagine scenarios where this would be a problem and Reload would not work.

adabo
  • Members
  • 385 posts
  • Last active: Jul 30 2015 07:52 PM
  • Joined: 13 May 2010
It also desrtoys all the guis. So if you have one that is active, it will flash, which is not very appealing.

KAI42
  • Guests
  • Last active:
  • Joined: --
+1 for the wishlist. Reload is a workaround, Pause is a workaround.

There should be a command that kills all running threads.

infogulch
  • Moderators
  • 717 posts
  • Last active: Jul 31 2014 08:27 PM
  • Joined: 27 Mar 2008
How about change Exit to take a parameter which is the number of threads to exit, including the current one.

E.g.
loop
    send hi `

Esc::Exit 2
Pressing Esc would exit the current (interrupting) thread (the one started by the Esc key) and the one directly underneath it (the one it interrupted), i.e. the loop.

tinku99
  • Members
  • 560 posts
  • Last active: Feb 08 2015 12:54 AM
  • Joined: 03 Aug 2007
+1 for this wish.
I need this functionality for my ahksandbox.
ahksandbox already prevents all insecure commands and functions, but is still vulnerable to denial of service via infinite loops.
the ability to kill all threads would allow the host script to do that after a time out for misbehaving scripts in the sandbox.
Will probably butcher the source to make it work one way or another...

Umpitygrumpity
  • Members
  • 2 posts
  • Last active: Feb 13 2015 06:46 PM
  • Joined: 20 Dec 2014

+1 for this wish.

 

I was searching all over the place for a way to immediately interrupt and kill/cancel any thread.  I think it would be immensely useful.  Had to make an account just to say this.. plus I see that it is very very old.  I hope one day it will be updated.



stankura
  • Members
  • 2 posts
  • Last active: Feb 27 2015 02:58 PM
  • Joined: 24 Feb 2015

the loop was just an example, i want to stop all timers, loops, running threads & anything else 

vrati пощенки кутии