-
Notifications
You must be signed in to change notification settings - Fork 272
Open
Description
Hey there 👋 I know that pb does not have any support for parallel exectuion, but when running two dedicated applications in parallel the ioctl on /dev/tty
Line 77 in f907f6f
| if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newTermios); err != nil { |
blocks which cause that they will never finish. So when running this with a simple go run main.go works fine:
package main
import (
"github.com/cheggaaa/pb"
)
func main() {
pool := pb.NewPool(&pb.ProgressBar{})
if err := pool.Start(); err != nil {
return
}
if err := pool.Stop(); err != nil {
return
}
}But running this application in parallel blocks and will never finish, which should happen because both processes sharing the same /dev/tty:
> echo go run main.go > commands
> echo go run main.go >> commands
> parallel < commands
[wait]
I think this issue could be fixed with some system wide mutex but I'm not sure if this is a nice solution. :-/
Metadata
Metadata
Assignees
Labels
No labels