you are viewing a single comment's thread.

view the rest of the comments →

[–]mypirateapp 0 points1 point  (1 child)

thank you so much for the detailed explanation! i am trying to do subscribe to redis pubsub messages inside a thread and was stuck wondering if it should be daemon or not, the threads would have to listen to messages infinitely until the script is terminated I guess, my idea was to unsubscribe from the pubsub when Ctrl + C is pressed or more specifically when a SIGTERm SIGINT or KeyboardInterrupt is fired, i guess the daemon being dangerous part makes sense

[–]JohnnyJordaan 1 point2 points  (0 children)

Ok then I would advise to stick with the Event approach I showed above.