>Event driven programming
Event driven programming
Other urls found in this thread:
cgi.di.uoa.gr
twitter.com
>Brainless sheep frogposters
No, you're right, let's keep everything in a single thread and freeze up while waiting for input.
Or better yet, check for input 100000 times per second and keep waking the CPU for no good reason.
frogposter > autism poster
fuck off to ur js ,shithead
those aren't mutually exclusive terms, user
frogposter == autism poster
Don't kid yourself OP, your denial tells all.
i have a gf and all
/thread
So you need a woman to validate your life? That's really fucking sad actually.
are you guys fucking stupid?
in an event based programming you wait for the event to fire
How do you know when events fire?
You have to check for them, dumbass.
actually OP is right , they are bad
All "event-driven" programming does is defer event polling from the programmer to a framework that may or may not do it efficiently.
It's like manual memory allocation vs garbage collection.
hardware interrupts
>implying that manual memory allocations isn't bad
await a()
await b()
await c()
await d()
await e()
const resultsFromF = await f()
console.log(resultsFromF)
Wouldn't that mean that a b c d & e can all run concurrently, when that is isn't true?
did you just use the fucking comparrison operator
And what does the interruption do ? Set a variable that the main program checks every so often ?
How does that solve anything ?
Yeah, do you have a problem with that, sperglord?
No, the await keyword is used to
wait for an asynchronous event to finish without blocking the event loop.
It is built on-top of es2015 Promises.
>>>
t.autism pajeet monkey
I don't get it.
Please explain how that makes sense. It doesn't.
is "which is finishing first"
Pretty sure it tells the OS to call callbacks.
It's better if the kernel does the polling than when the user software does it, because the kernel still can switch off unused ressources, unlike a polling software which drains your laptops batteries.
It blocks the calling thread to wait for an asynchronous function to finish so that every asynchronous function gets executed in order. Much easier and clearer to implement in comparison to promises and callbacks in my opinion. Javascript needed this for a long time.
Thanks, I get it now.
it's better than
objectGeneratorGeneratorHandleCreator()
>You have to check for them, dumbass.
No, you don't have to check for them. The framework checks for them. And the framework is smart enough not to use polling loops or blocking I/O.
who here /event-drivenObjective-orientedFunctionalImperativeProgramming/
>Event driven programming
Is awesome.
How do you check for events without spawning threads for polling loops with mutexes for blocking I/O?