vkuznet / transfer2go

Distributed, loosely couple agent-based transferring system
MIT License
8 stars 2 forks source link

Make buffered channels #33

Closed rishiloyola closed 7 years ago

rishiloyola commented 7 years ago

I made buffered channels to prevent the dead lock condition.

rishiloyola commented 7 years ago

Can you merge this pr? So that I can test it on VMs?

On Wed, Jul 19, 2017 at 12:04 PM, Valentin Kuznetsov < notifications@github.com> wrote:

@vkuznet commented on this pull request.

In core/business.go https://github.com/vkuznet/transfer2go/pull/33#discussion_r128163041:

    quit:       make(chan bool)}

}

// Start method starts the run loop for the worker, listening for a quit channel in // case we need to stop it func (w Worker) Start() { var err error +

  • // register the current worker into the worker queue.
  • w.JobPool <- w.JobChannel

I want to understand if there is a side effect when using this outside of goroutine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vkuznet/transfer2go/pull/33#pullrequestreview-50814448, or mute the thread https://github.com/notifications/unsubscribe-auth/AJoIVxWQJ1z7gJXwWU4J-ACJxFLjo49wks5sPaNygaJpZM4Ob-De .

vkuznet commented 7 years ago

Done.