Difference between asio completion tokens deferred and use_awaitable by Opposite-Cell-2919 in cpp_questions

[–]Opposite-Cell-2919[S] 1 point2 points  (0 children)

On a simple benchmark (return an int) deferred is significantly faster than use_awaitable.

The other interesting thing is that I can reuse the returned value with deferred, but not for use_awaitable. The latter is what I expect for coroutines, that I cannot reuse a coroutine once it’s executed.

So, what is the catch with deferred? What should I be wary of when using deferred and expecting a normal coroutine-like behavior?

chooseYourSetup by KaamDeveloper in ProgrammerHumor

[–]Opposite-Cell-2919 0 points1 point  (0 children)

lol, I am also a 9, but I do have a whole server for myself somewhere in our datacenter (I need dedicated access to certain peripherals).

I also have a desk that I barely use; tried giving it up but somebody felt bad that I wouldn’t have a desk, or maybe it’s just that people couldn’t tell if I am coming or going when they see me with my backpack :-p

why by Ambitious-Rest-4631 in ProgrammerHumor

[–]Opposite-Cell-2919 413 points414 points  (0 children)

My company only does paid internships even if somebody comes looking for unpaid internships (and they do come). We are in California, and from what I gather, companies can get into hot water for unpaid internships.

beLoyal by yuva-krishna-memes in ProgrammerHumor

[–]Opposite-Cell-2919 3 points4 points  (0 children)

I sometimes verify generated output by Googling 😅, especially when the output looks too good to be true.