You've already forked mpbot-github
mirror of
https://github.com/macports/mpbot-github.git
synced 2026-03-31 14:46:03 -07:00
15 lines
323 B
Go
15 lines
323 B
Go
package ci
|
|
|
|
// worker describes a generic worker holding a pointer
|
|
// to the Session it belongs to and a wait() method
|
|
// that pauses execution until the worker quits.
|
|
type worker struct {
|
|
session *Session
|
|
// signal to unblock wait()
|
|
quitChan chan byte
|
|
}
|
|
|
|
func (worker *worker) wait() byte {
|
|
return <-worker.quitChan
|
|
}
|