github.com/go-eden/common@v0.1.15-0.20210617133546-059099253264/goid/goid.go (about)

     1  package goid
     2  
     3  import "github.com/go-eden/routine"
     4  
     5  // Gid retrieve the current goroutine's unique id.
     6  // It will try get gid by reflect for better performance,
     7  // and could parse gid from stacktrace for failover supporting.
     8  func Gid() (id int64) {
     9  	return routine.Goid()
    10  }