I'm a fucking retard.
File descriptors are magic.
Yay!
I know how to do the scheduling in Kreeft!
Thank you epoll for being thread-safe.
epoll_ctl
changes stuff. :v
Hmm.
ivykis looks cooler as it can be used with kqueue as well..
Oh wait beh callback-based.
Monocles are cool.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Session do | |
def get key, req do | |
case :cowboy_req.cookie "session_id", req do | |
{ :undefined, req } -> { nil, req } | |
{ session_id, req } -> | |
case :gen_server.call SessionStore, { :get, session_id, key } do | |
{ :ok, value } -> { value, req } | |
nil -> { nil, req } | |
end |
NewerOlder