Esempio n. 1
0
 def _get_or_create_object(self, name, proxy_type):
     if self.state != _STATE_ACTIVE:
         raise TransactionError("Transaction is not in active state.")
     self._check_thread()
     key = (proxy_type, name)
     try:
         return self._objects[key]
     except KeyError:
         proxy = proxy_type(name, self)
         self._objects[key] = proxy
         return make_blocking(proxy)
 def _get_or_create_object(self, name, proxy_type):
     if self.state != _STATE_ACTIVE:
         raise TransactionError("Transaction is not in active state.")
     self._check_thread()
     key = (proxy_type, name)
     try:
         return self._objects[key]
     except KeyError:
         proxy = proxy_type(name, self)
         self._objects[key] = proxy
         return make_blocking(proxy)
Esempio n. 3
0
 def blocking(self):
     """Returns a version of this proxy with only blocking method calls."""
     return make_blocking(self)
Esempio n. 4
0
File: base.py Progetto: OlyaT/FunFic
 def blocking(self):
     """
     :return: Return a version of this proxy with only blocking method calls
     """
     return make_blocking(self)
Esempio n. 5
0
 def setUp(self):
     self.calculator = make_blocking(MakeBlockingTest.Calculator())
 def setUp(self):
     self.calculator = make_blocking(MakeBlockingTest.Calculator())
Esempio n. 7
0
 def blocking(self):
     """
     :return: Return a version of this proxy with only blocking method calls
     """
     return make_blocking(self)