What are the two ways you can synchronize a block of code?

Answer Posted / popol83

I think using mutex is the second way.
Because synchronizing an object is useless

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a byte string?

838


When does a class need a virtual destructor?

771


What makes a function well defined?

793


What do you mean by scope of variable?

679


What is a map in java?

783


Does set allows null in java?

740


What is the disadvantage of java?

732


If two threads have same priority which thread will be executed first ?

1175


Is cout buffered?

912


When can you say a graph to be a tree?

862


What is the argument in java?

724


What do you mean by mnemonics?

793


What is an infinite loop in java? Explain with an example.

810


What does system out println () do?

811


What is meant by data hiding/encapsulation?

855