MCPcopy
hub / github.com/nats-io/nats.go / getStacks

Function getStacks

test/conn_test.go:855–871  ·  view source on GitHub ↗
(all bool)

Source from the content-addressed store, hash-verified

853}
854
855func getStacks(all bool) string {
856 var (
857 stacks []byte
858 stacksSize = 10000
859 n int
860 )
861 for {
862 stacks = make([]byte, stacksSize)
863 n = runtime.Stack(stacks, all)
864 if n == stacksSize {
865 stacksSize *= 2
866 continue
867 }
868 break
869 }
870 return string(stacks[:n])
871}
872
873func isRunningInAsyncCBDispatcher() error {
874 strStacks := getStacks(false)

Callers 2

isAsyncDispatcherRunningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected