OOP question about functions that struck me all of a sudden.
Posted
by Nitesh Panchal
on Stack Overflow
See other posts from Stack Overflow
or by Nitesh Panchal
Published on 2010-03-24T11:09:53Z
Indexed on
2010/03/24
11:13 UTC
Read the original article
Hit count: 196
oop
Hello, May be my question is stupid. But i would like to get it cleared. We know that functions are loaded in memory only once and when you create new objects, only instance variables gets created, functions are never created. My question is, say suppose there is server and all clients access a method named createCustomer(). Say suppose all clients do something which fired createCustomer on server. So, if the method is in middle of execution and new client fires it. Will the new request be put on wait? or new request also will start executing the method? How does it all get managed when there is only one copy of function in memory? No book mentions answers to this type of questions. So i am posting here where i am bound to get answers :).
© Stack Overflow or respective owner