Sugar Content.
Ticket created by ~satchmo on ~sircmpwn/dowork
#Issue
If
Queue::Shutdown()
sendsnil
intoq.shutdown
before the goroutine inQueue::Start()
creates the channel, the send will block indefinitely asq.shutdown
would still be anil
channel.#Reproduction
Running the following a few times should reproduce the issue.
package main import ( "context" "git.sr.ht/~sircmpwn/dowork" ) func main() { task := work.NewTask(func(ctx context.Context) error { return nil }) work.Enqueue(task) work.Shutdown() }
Comment by ~satchmo on ~satchmo/libvmm
Can't slice Address if ya can't create one in the first place big brain.
Ticket created by ~satchmo on ~satchmo/libvmm
It avoids requiring a copy of the object to be made.
Ticket created by ~satchmo on ~satchmo/libvmm
Something like this:
const std::string somevalue = [&](){ if (caseA) { return "Value A"; } else if (caseB) { return "Value B"; } else { return "Value C"; } }();