Exemplo n.º 1
0
def patch_cache_rr(lock_obj):
    import rr_cache
    import rr_cache_with_lock
    rr_lock1lvl = rr_cache_with_lock.create_cache1lvl(lock_obj)
    rr_lock2lvl = rr_cache_with_lock.create_cache2lvl(lock_obj)
    __patch(rr_cache, 'cache1lvl', rr_lock1lvl)
    __patch(rr_cache, 'cache2lvl', rr_lock2lvl)
Exemplo n.º 2
0
def patch_cache_rr(lock_obj):
    import rr_cache
    import rr_cache_with_lock
    rr_lock1lvl = rr_cache_with_lock.create_cache1lvl(lock_obj)
    rr_lock2lvl = rr_cache_with_lock.create_cache2lvl(lock_obj)
    __patch(rr_cache, 'cache1lvl', rr_lock1lvl)
    __patch(rr_cache, 'cache2lvl', rr_lock2lvl)
Exemplo n.º 3
0
def patch_cache_rr(lock_obj):
    """
    Patches cache mechanizm to be thread safe (gevent ones also)

    .. note::

       It's internal maras mechanizm, it will be called when needed

    """
    import rr_cache
    import rr_cache_with_lock
    rr_lock1lvl = rr_cache_with_lock.create_cache1lvl(lock_obj)
    rr_lock2lvl = rr_cache_with_lock.create_cache2lvl(lock_obj)
    __patch(rr_cache, 'cache1lvl', rr_lock1lvl)
    __patch(rr_cache, 'cache2lvl', rr_lock2lvl)
Exemplo n.º 4
0
def patch_cache_rr(lock_obj):
    """
    Patches cache mechanizm to be thread safe (gevent ones also)

    .. note::

       It's internal CodernityDB mechanizm, it will be called when needed

    """
    import rr_cache
    import rr_cache_with_lock
    rr_lock1lvl = rr_cache_with_lock.create_cache1lvl(lock_obj)
    rr_lock2lvl = rr_cache_with_lock.create_cache2lvl(lock_obj)
    __patch(rr_cache, 'cache1lvl', rr_lock1lvl)
    __patch(rr_cache, 'cache2lvl', rr_lock2lvl)