Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Threads vs Event Loop

Name: Anonymous 2016-09-30 8:37

Which one wins the final battle?

Name: Anonymous 2016-09-30 10:08

Put an event loop in a gpu?

Name: Anonymous 2016-09-30 10:35

Put an event loop in my anus.

Name: Anonymous 2016-09-30 11:39

>>3
I prefer multiple event loops strung together on a thread.

Name: Anonymous 2016-09-30 12:37

Multi-threaded event handling would be fine anyway

Name: Anonymous 2016-09-30 23:20

Your question doesn't make any sense.

Name: Cudder !cXCudderUE 2016-10-01 2:29

Coroutines.

Name: Anonymous 2016-10-01 10:43

>>7
*Goroutines

Name: Confucius 2016-10-01 11:03

Say -- Overthrow Unelected Chinese Government

50089 41939 26362 11787 89255 43309 09929
60155 31956 29537 84925 00902 46701 47928
30401 96887 71846 69273 62707 75895 95496
74712 90573 49550 99122 10721 55203 21044

Name: Anonymous 2016-10-04 17:22

>>8

Fuck go, it doesn't even have delimited continuations (which makes the implementation of coroutines trivial).

Name: Anonymous 2016-10-04 17:50

Check em faggots

Name: Anonymous 2016-10-05 8:56

>>10
Not even all Schemes have delimited continuations, what did you expect? Nobody likes delimconts, they make our heads hurt.

Name: Anonymous 2016-10-05 15:28

>>12

It is not that horrible if you look at the denotational semantics. And theoretically you can define shift/reset in terms of call/cc, but this is error prone.

Racket nicely documented it:

(reset val) => val
(reset E[(shift k expr)]) => (reset ((lambda (k) expr)
(lambda (v) (reset E[v]))))

The second rule is important.

E is the computation you captured. It is the part between reset and shift. Then with shift k expr, you are going to reify your captured computation E into a function k, which you then can call as often as you want, put it into a variable or whatever.

As you can see, a new barrier (reset) is instantiated with shift/reset. (the part lambda (v) (reset E[v])), but with control/prompt this isn't done.

Don't change these.
Name: Email:
Entire Thread Thread List