A worker generates, writes the result, then tells the queue. If it dies after the write and before the tell, the queue never heard back, so it hands the request out again.
Interviewers like to ask for exactly-once processing. It isn't on offer when a machine can die between doing the work and recording it.
What you can build is at-least-once delivery: every request runs at least once, and now and then twice. Then make the effects safe to repeat. The customer sees one result and pays once, while the GPU occasionally does the work twice.
Amazon SQS's guide states the bargain: design your application to be idempotent, unharmed when it processes the same message more than once.
An ack, short for acknowledgment, is the worker telling the queue it's done. In the editor, write results_stored(order, finished): the worker runs write and ack in order, and dies after the first finished of them. Return how many results the customer ends up with, when the queue hands out again any request it never got an ack for.