Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Synchronized

 
Allan Tan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following can be synchronized ?
methods?
member variables?
local variables?
code blocks?
static/non-static class?
 
Paul Caudle
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Allan,
Methods and code blocks are the only items in your list that may be synchronized.
A method may be synchronized using it in the header as in:

and a block of code may be syncronized like the following:

I hope that helps,
Paul
[This message has been edited by Paul Caudle (edited November 06, 2000).]
[This message has been edited by Paul Caudle (edited November 06, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic