Closed
Description
Background and motivation
Umm...probably pretty obvious.
Sure, var foo = location++
is probably atomic... But this is clearer.
API Proposal
namespace System.Threading;
public class Interlocked
{
public nuint Increment(ref nuint location);
public nint Increment(ref nint location);
}
API Usage
// Fancy the value
nuint foo = 0;
var bar = Interlocked.Increment(ref foo);
Alternative Designs
No response
Risks
None