Logo
The code works on my machine :shrug:
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • 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
10 months ago 589.8K 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

WALI Monitor Arm Mount for Desk, Single Extra Tall Computer Desk Mount, Monitor Bracket Mount Stand Single, up to 32 inch, 22 lbs (M001XL), Black

WALI Monitor Arm Mount for Desk, Single Extra Tall Computer Desk Mount, Monitor Bracket Mount Stand Single, up to 32 inch, 22 lbs (M001XL), Black

Affiliate
$34.97
Reopening Shut Cases For Investigation

Reopening Shut Cases For Investigation

Programming
88.7K views 2 years ago
VBA Has No Right To Be That Powerful

VBA Has No Right To Be That Powerful

Programming
554.1K views 1 year ago