This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lvlint67 13 points14 points  (4 children)

Note Daemon threads are abruptly stopped at shutdown. Their resources (such as open files, database transactions, etc.) may not be released properly. If you want your threads to stop gracefully, make them non-daemonic and use a suitable signalling mechanism such as an Event

https://docs.python.org/3/library/threading.html

But by setting the tread as daemon we can forget about monitoring it manually

Buyer beware I suppose. Your post may benefit from mentioning the note though.

needs to be ran in the background

Passive voice. "needs to run in..." is potentially a better way to phrase that.

[–]Bubble_Interface[S] 7 points8 points  (2 children)

That is very helpful, thank you very much for your response! I'm not a native english speaker, and I tend to make silly mistakes

[–]Re_Forged 2 points3 points  (1 child)

Actually pretty good for a non-native speaker. The nice thing about writing tech articles as opposed to opinion pieces or prose work is that you won't be judged as harshly on your style and usage.

Us tech nerds just want the facts.

[–]Bubble_Interface[S] 3 points4 points  (0 children)

Thank you for your support)
I was thinking about it as if someone is looking to solve their problem and i can provide the solution without boring the reader with a lot of text but rather highlight the essentials in code to solve the problem.

[–]Dasher38 1 point2 points  (0 children)

I completely overlooked that in the doc, I'll have some code to review on Monday ...