pyspeedup/concurrent/_cache.py
def _getValue(a_dict,a_queue,an_event,wait,func,*item):
    '''This gets the cached value for a task, or submits a new job and waits on it to complete.'''
    try:
        if not wait:
            return a_dict[item]
        temp=a_dict[item]
        while temp is _StillWaiting:
            an_event.wait(.1)
            temp=a_dict[item]
        return temp
    except:
        a_dict[item]=_StillWaiting
        if wait:
            a_dict[item]=func(*item)
            return a_dict[item]
        else:
            a_queue.put(item)
This gets the cached value for a task, or submits a new job and waits on it to complete.
This gets the cached value for a task, or submits a new job and waits on it to complete.
This gets the cached value for a task or submits a new job and waits on it to complete .
def _getValue(a_dict,a_queue,an_event,wait,func,*item):
    try:
        if not wait:
            return a_dict[item]
        temp=a_dict[item]
        while temp is _StillWaiting:
            an_event.wait(.1)
            temp=a_dict[item]
        return temp
    except:
        a_dict[item]=_StillWaiting
        if wait:
            a_dict[item]=func(*item)
            return a_dict[item]
        else:
            a_queue.put(item)
def _getValue ( a_dict , a_queue , an_event , wait , func , * item ) : try : if not wait : return a_dict [ item ] temp = a_dict [ item ] while temp is _StillWaiting : an_event . wait ( .1 ) temp = a_dict [ item ] return temp except : a_dict [ item ] = _StillWaiting if wait : a_dict [ item ] = func ( * item ) return a_dict [ item ] else : a_queue . put ( item )
This gets the cached value for a task, or submits a new job and waits on it to complete.
This gets the cached value for a task or submits a new job and waits on it to complete .
'''This gets the cached value for a task, or submits a new job and waits on it to complete.'''
a_dict
a_queue
an_event
wait
func