Fork me on GitHub
#sql
<
2019-09-24
>
orestis10:09:33

There were some nice videos in the recent years. It's an exciting thing to receive "for free".

✔️ 4
orestis10:09:11

So just write first semester CS synchronous code and and execute it on a dedicated fiber.

dharrigan16:09:52

I wonder how Clojure will work with Loom when it comes in

seancorfield16:09:47

@dharrigan Via Java interop and then probably a wrapper library. Clojure has to continue running on older JDKs for a long time so nothing in Clojure can change to leverage Loom directly until sufficient users are on that newer JVM.

dharrigan18:09:28

so the ability to use a library would make sense

dharrigan18:09:33

pick and choose 🙂

seancorfield18:09:29

Someone (maybe @ghadi?) posted a Gist of some code that would wrap/leverage fibers and it was pretty simple.

ghadi18:09:55

should be something like: Socket.accept(Fiber.spawn(() -> doStuff(s)))

hiredman19:09:40

Will it even be that? My cursory understanding was the majority of the changes are under the hood so to speak, so you would use the socket API as normal, and if you call accept from within a fiber it does all the callback stuff internally in the jvm

ghadi20:09:55

that's right @hiredman -- most Socket.read() and j.u.c.ReentrantLock.lock() usages would be seamless

ghadi20:09:37

The http request handler tying up a Thread would instead launch a fiber, no problem