So, if a new allocation is needed, the code first checks to see if
there are any remembered allocations for the key. If not, it checks
the free pool. If the free pool is empty then it dumps the remembered
- allocations to free the pool. This final desparate step will not
+ allocations to free the pool. This final desperate step will not
happen often in practice.
"""
if key in self.remembered:
return self.allocations[key]
if not self.pool:
- # Desparate times. Try to get more in the pool.
+ # Desperate times. Try to get more in the pool.
self.pool.update(self.remembered.values())
self.remembered.clear()
if not self.pool:
@param: context - contains user information
@param: host - originator of callback
- @return: True if succesfully registered, False if not successfully
+ @return: True if successfully registered, False if not successfully
registered, None if no handler found
If unsuccessful the agent should retry registration a few
seconds later