Skip to content

Commit

Permalink
makefile update
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoya Yokoyama committed Dec 10, 2017
1 parent db789f8 commit 6b212e1
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,21 +419,6 @@ type Pauser struct {
DrawMux sync.Mutex
}

func newPauser() *Pauser {
var (
mu1 sync.Mutex
mu2 sync.Mutex
)
mu1.Lock() //Mutex is availablize.
mu2.Lock() //Mutex is availablize.
stop := make(chan struct{}, 0)
return &Pauser{
Stop: stop,
MainMux: mu1,
DrawMux: mu2,
}
}

/*This is Main loop*/
func drawLoop(maxX, maxY int, pauser *Pauser) {

Expand Down Expand Up @@ -769,7 +754,11 @@ func main() {
sleep := false

/*pauser give pause implementation*/
pauser := newPauser()
pauser := &Pauser{
Stop: make(chan struct{}, 0),
}
pauser.MainMux.Lock()
pauser.DrawMux.Lock()

go keyEventLoop(killKey)
go drawLoop(maxX, maxY, pauser)
Expand Down

0 comments on commit 6b212e1

Please sign in to comment.