Is the "lock" statement in C# time-consuming?

Posted by markattwood on Stack Overflow See other posts from Stack Overflow or by markattwood
Published on 2010-05-21T23:15:43Z Indexed on 2010/05/21 23:20 UTC
Read the original article Hit count: 184

Filed under:
|

I have a method which has been called many times by other methods to hash data. Inside the method, some lock statements are used. Could you please let me know whether the lock statement is time-consuming and what is the best way to improve it.

P/S: I have been finding a way to avoid using the lock statement in this method.

© Stack Overflow or respective owner

Related posts about c#

Related posts about lock