File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -419,21 +419,6 @@ type Pauser struct {
419
419
DrawMux sync.Mutex
420
420
}
421
421
422
- func newPauser () * Pauser {
423
- var (
424
- mu1 sync.Mutex
425
- mu2 sync.Mutex
426
- )
427
- mu1 .Lock () //Mutex is availablize.
428
- mu2 .Lock () //Mutex is availablize.
429
- stop := make (chan struct {}, 0 )
430
- return & Pauser {
431
- Stop : stop ,
432
- MainMux : mu1 ,
433
- DrawMux : mu2 ,
434
- }
435
- }
436
-
437
422
/*This is Main loop*/
438
423
func drawLoop (maxX , maxY int , pauser * Pauser ) {
439
424
@@ -769,7 +754,11 @@ func main() {
769
754
sleep := false
770
755
771
756
/*pauser give pause implementation*/
772
- pauser := newPauser ()
757
+ pauser := & Pauser {
758
+ Stop : make (chan struct {}, 0 ),
759
+ }
760
+ pauser .MainMux .Lock ()
761
+ pauser .DrawMux .Lock ()
773
762
774
763
go keyEventLoop (killKey )
775
764
go drawLoop (maxX , maxY , pauser )
You can’t perform that action at this time.
0 commit comments