Re: Overhead of synchronized class used in unshared situation

2011-11-28 Thread Timon Gehr
On 11/28/2011 07:37 AM, breezes wrote: Thanks. It seems that I have to write two classes, one synchronized and one is not. Of course the synchronized one should be the wrapper. However, all members of a synchronized class are also shared. So I can not use the un-synchronized class in the

Overhead of synchronized class used in unshared situation

2011-11-27 Thread breezes
I have several cumtermized data structures which will be used both in shared and unshared situations. Because un-synchronized classes can not be used in shared situation, I think i have to define these classes as synchronized classes, because otherwise i will have to write the same class twice.

Re: Overhead of synchronized class used in unshared situation

2011-11-27 Thread Jonathan M Davis
On Sunday, November 27, 2011 13:53:49 breezes wrote: I have several cumtermized data structures which will be used both in shared and unshared situations. Because un-synchronized classes can not be used in shared situation, I think i have to define these classes as synchronized classes,

Re: Overhead of synchronized class used in unshared situation

2011-11-27 Thread breezes
Thanks. It seems that I have to write two classes, one synchronized and one is not. Of course the synchronized one should be the wrapper. However, all members of a synchronized class are also shared. So I can not use the un-synchronized class in the synchronized wrapper class directly. I found

Re: Overhead of synchronized class used in unshared situation

2011-11-27 Thread Jonathan M Davis
On Monday, November 28, 2011 06:37:39 breezes wrote: Thanks. It seems that I have to write two classes, one synchronized and one is not. Of course the synchronized one should be the wrapper. However, all members of a synchronized class are also shared. So I can not use the un-synchronized