Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

synchronize variable by lock

 
Stefan Müllerheim
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i try to synchronize the access to a variable and wrote something below. is that correct? see anybody any fault?
 
Henry Wong
author
Marshal
Pie
Posts: 21122
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, there is no need to create a new local variable...



Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic