Hi, all.
I have some code:
...
func RunTimeout(c *exec.Cmd, cnl context.CancelFunc) error {
defer cnl()
if err := c.Start(); err != nil {
return err
}
return c.Wait()
}
func main() {
ctx, cnl := context.WithTimeout(context.Background(), 10*time.
Hello, all!
There is a part of code:
...
// RunTimeout runs the given command with the given timeout.
// If the command times out, it attempts to kill the process.
func RunTimeout(c *exec.Cmd, timeout time.Duration) error {
if err := c.Start(); err != nil {
return err
Hi all!
Is there any way to count number of OS threads used by Go runtime
programmatically (ie without using bash with top/ps and others)?
--
Best regards, Yuri
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group an