code_junkie

Is .NET System.Net.CookieContainer thread safe?

Nov 13th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. lock(syncLock) {
  2. // prepare request from (synchronized) state
  3. req.Begin{...}
  4. }
  5.  
  6. lock(syncLock) {
  7. // ...read values from request...
  8. // ...update local state...
  9. }
  10.  
  11. private readonly object syncLock = new object();
Add Comment
Please, Sign In to add comment