532 karma · joined September 28, 2016
For example, it is as if you created an HTTP server that only allows one concurrent request. Or having a queue where only 1 worker will ever do work. Is that your workload? Because I'm not sure I know of many workloads that are completely sync with only 1 worker.
To get a better representation for individual_transfers, I would use a waitgroup
var wg sync.WaitGroup
var mu sync.Mutex
completedCount := 0
for i := 0; i < len(transfers); i++ {
wg.Add(1)
go func(index int, transfer Transfer) {
defer wg.Done()
res, _ := client.CreateTransfers([]Transfer{transfer})
for _, err := range res {
if err.Result != 0 {
log.Printf("Error creating transfer %d: %s", err.Index, err.Result)
}
}
mu.Lock()
completedCount++
if completedCount%100 == 0 {
fmt.Printf("%d\n", completedCount)
}
mu.Unlock()
}(i, transfers[i])
}
wg.Wait()
fmt.Printf("All %d transfers completed\n", len(transfers))
This will actually allow the client to batch the request internally and be more representative of the workloads you would get. Note, the above is not the same as doing the batching manually yourself. You could call createTransfer concurrently the client in multiple call sites. That would still auto batch themPHP has created mysqli or PDO to deal with this specifically because of the known issues of it being expensive to recreate client connects per request
365: 2515/12552 M4: 3763/14694
https://browser.geekbench.com/processors/amd-ryzen-ai-9-365 https://browser.geekbench.com/v6/cpu/11020192
For $800 the M4 Air just seems like one of the best tech deals around.
Makes me wonder why you felt the need to create a burner account.
This isn't to say anything one way or another about you, its just my 2 second of reading about you.
The problem with most philanthropic organizations is that they come to rely on a constant stream of money. I've heard the Gates Foundation have to be very intentional with how they deploy capital. Because whole ecosystems come to rely on that money in an unsustainable way. So when they have met their goals or decided its not working and pull funding, those that relied on the funding basically collapse overnight. Which could lead to even worse outcomes.
With her approach, I do wonder if this will occur with many of the organizations she is giving large amount of money to.
EDIT: Reminds me of the saying "Give a person a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime".
I for one am and will always be a cloudflare customer
The new CEO had to rectify the situation. Its a horrible situation but at the end of the day, it was going to happen