Skip to content

Instantly share code, notes, and snippets.

View acllm's full-sized avatar
😀
Work & Enjoy!

acllm acllm

😀
Work & Enjoy!
View GitHub Profile
@acllm
acllm / get_go_routine_id.go
Last active November 13, 2023 03:31 — forked from metafeather/main.go
Get goroutine id for debugging
package main
// 80195: doc/faq: explain why goroutines are anonymous | https://go-review.googlesource.com/c/go/+/80195
// faq: document why there is no way to get a goroutine ID | https://github.com/golang/go/issues/22770
import (
"fmt"
"runtime"
"strconv"
"strings"