Ray's Galactic Tech
Ray's Galactic Tech
Nov 22, 2025 · Backend Development

How to Safely Stop Java Threads: Best Practices and Code Samples

This guide explains why Thread.stop() is unsafe, compares flag‑based, interruption‑based, and ExecutorService approaches, provides complete Java examples, usage steps, precautions, and advanced techniques for reliably stopping threads while releasing resources correctly.

ConcurrencyExecutorServiceJava
0 likes · 8 min read
How to Safely Stop Java Threads: Best Practices and Code Samples
FunTester
FunTester
Mar 4, 2025 · Backend Development

Mastering Graceful Shutdown in Go: Clean Exit for Servers and Goroutines

This guide explains why graceful shutdown matters in Go programs, outlines the steps to capture termination signals, use context for coordinated goroutine exit, and properly close HTTP servers without data loss or resource leaks.

ConcurrencyGraceful ShutdownResource Cleanup
0 likes · 9 min read
Mastering Graceful Shutdown in Go: Clean Exit for Servers and Goroutines
Liangxu Linux
Liangxu Linux
Dec 2, 2023 · Fundamentals

Simplify Linux Driver Probes with Device Resource Management (devm_ APIs)

This article explains how Linux kernel drivers can replace repetitive error‑handling and manual resource cleanup in probe functions by using the device‑resource‑management framework and its devm_ helper APIs, showing concrete code transformations, data‑structure details, and the underlying mechanisms that automate allocation and release.

Device Resource ManagementResource Cleanupdevm
0 likes · 18 min read
Simplify Linux Driver Probes with Device Resource Management (devm_ APIs)
Node Underground
Node Underground
Oct 25, 2016 · Backend Development

How to Gracefully Shut Down Your Application: A Step-by-Step Guide

Graceful application shutdown prevents blocked requests, accidental data writes, and operation failures by releasing resources, closing database connections, and handling SIGTERM signals, and this article outlines a practical step-by-step process—including load balancer coordination and sample Node.js code—to ensure clean termination.

Graceful ShutdownResource CleanupSIGTERM
0 likes · 2 min read
How to Gracefully Shut Down Your Application: A Step-by-Step Guide