Logo
HTTP 451: Unavailable for legal reasons (Fahrenheit 451).
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • Csharp Csharp
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Concurrent-dictionary Memes

Posts tagged with Concurrent-dictionary

The Best Way To Make An Infinite Loop

Csharp Programming Debugging
5 months ago 490.3K views 0 shares
The Best Way To Make An Infinite Loop
Someone discovered that C#'s ConcurrentDictionary.AddOrUpdate() method is basically a cheat code for infinite loops. Instead of the boring while(true) , they're using a lambda that ignores the key, ignores the current value, and just... keeps updating the same dictionary entry forever. The lambda returns value , which triggers another update, which calls the lambda again, which returns value , which... you get it. The genius part? The IDE shows "No issues found" because technically this is perfectly valid code. It's like telling your compiler "I'm not stuck in an infinite loop, I'm just very enthusiastic about updating this dictionary!" The output window spamming "Hello, World!" is chef's kiss—proof that sometimes the most cursed solutions are also the most creative. Pro tip: Don't actually do this unless you want your code reviewer to question your life choices and your CPU to file a restraining order.

Today's picks

ViewSonic VX3276-4K-MHD 32 Inch 4K UHD Monitor with Ultra-Thin Bezels, HDR10 HDMI and DisplayPort for Home and Office

ViewSonic VX3276-4K-MHD 32 Inch 4K UHD Monitor with Ultra-Thin Bezels, HDR10 HDMI and DisplayPort for Home and Office

Affiliate
$271.99
I want this as a git command!

I want this as a git command!

Linux
62.4K views 2 years ago
Dont Touch My Code

Dont Touch My Code

Programming
71.2K views 1 year ago