Proposals: Synchronization

Chris Miller chris at dprogramming.com
Sat Jul 22 21:50:28 PDT 2006


I agree with everything in your proposal!

C# also allows you to lock() on a string literal/constant. I think this  
works because a string is just another object that can be locked on, and  
all string literals with the same text end up becoming one string object.  
This is very handy. Perhaps D could allow locking/synchronizing on string  
literals by having the compiler to create a static Lock instance for each  
unique string literal used for synchronization.



More information about the Digitalmars-d mailing list