Beispiel #1
0
// Manages the complete lifecycle of a buy.
// When a bool can be read from interrupt, the buy is aborted.
func (a *BuyActivity) PerformBuy(log bitwrk.Logger, interrupt <-chan bool, workFile cafs.File) (cafs.File, error) {
	a.workFile = workFile.Duplicate()

	file, err := a.doPerformBuy(log, interrupt)
	if err != nil {
		a.execSync(func() { a.lastError = err })
	}
	return file, err
}