Async programming

>async programming

Attached: 1550268614732s.jpg (246x250, 9.82K)

>Task.Run

Attached: 162397562359235.png (723x444, 148.31K)

LOW PROXIMITY MAGNETIC DISTORSION SYSTEM

>Async programming with kotlin

suspend fun preparePost(): Token {
// makes a request and suspends the coroutine
return suspendCoroutine { /* ... */ }
}

Attached: images.jpg (225x224, 5.18K)

Platform.runLater(() -> doSomeJavaShit());

>await DoSomeShitAsync()
wow so hard

const foo = async () => new Promise(resolve => setTimeout(resolve, 3000));

it warms my heart knowing there are people out there literally unable to comprehend such a simple concept

go gas(jews)
problem?

tbf async is mish-mash of parallelization concepts. its a pretty abstraction for writing, but debugging is a nightmare in a lot of languages depending on how their arbiters.

What an excellent post

It's simple in C#. Use async/await for anything I/O bound and Task.Run for anything CPU bound.

>everything but the kitchen sync programming

Attached: pOaawCumyXJL.png (600x464, 119.77K)

my first experience with async shit was with java's CompletableFuture at work and I was not looking forward to it because of memes. But it turns out it's super easy and you basically just write normal code and it works the exact same except for the exception bs but you have .catch() for that.

based

I like to work with JS's async stuff.

async is easy to understand but it's rarely implemented well. python asyncio is fucking awful.

std::jthread worker{[](){ std::cout

Attached: 1616446329728.jpg (200x160, 6.75K)

c++ is as ugly as rust

Just pretend memory is infinite and stop worrying.

Memory is cheap, CPU cycles are cheap, just write crap software same as everyone else.

>async
not necessary here