Exemple #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
Exemple #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
Exemple #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")
Exemple #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")