コード例 #1
0
ファイル: winpdb_gs.py プロジェクト: sernc11/greenlib
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
コード例 #2
0
ファイル: winpdb_gs.py プロジェクト: GreenSocs/greenlib
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
コード例 #3
0
ファイル: winpdb_gs.py プロジェクト: GreenSocs/greenlib
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")
コード例 #4
0
ファイル: winpdb_gs.py プロジェクト: sernc11/greenlib
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")