ZhengweiZhu commented on PR #3096: URL: https://github.com/apache/brpc/pull/3096#issuecomment-3322292264
> > > I think you can traverse the global `butil::ResourceId<TaskMeta>::_block_groups` and get all tids. > > > > > > That's huge. And they represent all bthread id which ever existed,not living one? > > No. After a bthread exit, its TaskMeta will be return to the ResourcePool, and be reused by new bthread. When you traverse the ResourcePool, you only need to traverse those slots in use, you don't need to traverse those in the free list. How to judge if the slot is in use? @chenBright The TaskStatus is only used when TaskTracer is enabled, but I want this pr to be applicable even when TaskTracer is not enabled. If I can judge if the slot is in use, then I need to traverse in the same way as `describe_resources` does? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org