dcsimg
Static function synhronization
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alexander_F
Posted On:   Sunday, March 31, 2002 06:50 AM

I have single instance of class "Server".This class containes one static funtion that is called from two client simultaneously.

The question is : do i have to synhronize non-static objects that i declare in this static function ?


class Server{

static Object get(Object param1,Object param2){

SomeObject obj= new SomeObject(param1);

return obj.create(param2);

}

}



I.e. do i have to synhronize SomeObject obj instance ?

Thanks

Re: Static function synhronization

Posted By:   Bozidar_Dangubic  
Posted On:   Monday, April 1, 2002 09:35 AM

no.

Re: Static function synhronization

Posted By:   Gennadiy_Vasilevskiy  
Posted On:   Sunday, March 31, 2002 10:12 AM

If you declare the objects inside the function than - no;
if you use global variables than yes;
You do not need an instance of a Server Class to call it's static function(borov)
About | Sitemap | Contact