Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

terminate

How to stop/terminate a python script from running?

November 12, 2022 by Tarik

You can also do it if you use the exit() function in your code. More ideally, you can do sys.exit(). sys.exit() which might terminate Python even if you are running things in parallel through the multiprocessing package. Note: In order to use the sys.exit(), you must import it: import sys

Categories python Tags execution, python, terminate, termination Leave a comment

How to stop C++ console application from exiting immediately?

October 13, 2022 by Tarik

If you are using Visual Studio and you are starting the console application out of the IDE: pressing CTRL-F5 (start without debugging) will start the application and keep the console window open until you press any key.

Categories c++ Tags c++, c++-faq, console, exit, terminate Leave a comment

Is there any way to kill a Thread?

September 6, 2022 by Tarik

It is generally a bad pattern to kill a thread abruptly, in Python, and in any language. Think of the following cases: the thread is holding a critical resource that must be closed properly the thread has created several other threads that must be killed as well. The nice way of handling this, if you … Read more

Categories python Tags kill, multithreading, python, terminate Leave a comment
Newer posts
← Previous Page1 Page2

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa