Exemplo n.º 1
0
def get_ident():
    "replacement function for thread.get_ident() which is gs-aware"
    tmp = orig_get_ident()
    if tmp in sc_elab_threads:
        cb = gs.get_current_callback()
        if cb: return cb.nr
    return tmp
Exemplo n.º 2
0
def get_ident():
    "replacement function for thread.get_ident() which is gs-aware"
    tmp = orig_get_ident()
    if tmp in sc_elab_threads:
        cb = gs.get_current_callback()
        if cb:
            return cb.nr
    return tmp
Exemplo n.º 3
0
def get_name():
    "function to get the name of the active gs thread if possible"
    try:
        cb = gs.get_current_callback()
        inm = cb.interpreter_name
        tnm = cb.name
        return "%s*%s" % (inm, tnm)
    except AttributeError:
        return rpdb2.threading._newname("Dummy-%d")
Exemplo n.º 4
0
def get_name():
    "function to get the name of the active gs thread if possible"
    try:
        cb = gs.get_current_callback()
        inm = cb.interpreter_name
        tnm = cb.name
        return "%s*%s" % (inm, tnm)
    except AttributeError:
        return rpdb2.threading._newname("Dummy-%d")