Guest User

Untitled

a guest
Feb 13th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. func(p *Proc) Doer(){
  2. p.AsyncWaitForEnd()
  3. for{
  4. // do some stuff
  5. }
  6. }
  7. func(p *Proc) AsyncWaitForEnd(){
  8. go func() {
  9. <-p.channel
  10. // terminate Doer
  11. }()
  12. }
Add Comment
Please, Sign In to add comment