How do you close a network socket such that the cost is lowest for the server and highest for the client? Specifically when a server open to the public receives thousands of DDOS hits, how can I close the connection…

In an earlier article I described how to write a read/write lock. This type of lock can lock a shared resource to allow multiple reader thread or a single writer thread and no readers. But sometimes you want to be…

Powerful languages make it easy to overuse resources – especially memory. static_assert is a good way to detect these problems early. In a recent project, I created a hash table with 256 buckets where I needed to add a random…