Search
16:33:30
phoe
though I have no idea if interrupting threads is a good idea
16:34:04
Shinmera
interrupting threads is not great, no, but if you're not the thread to shut down there's often no other way
16:34:18
phoe
can't you pull the carpet that the thread is standing on?
16:34:30
phoe
and literally close the connection's socket while the thread is executing?
16:34:41
phoe
the thread will then *&#&@*&^[ and die in pain
16:34:46
phoe
which will achieve the goal
16:35:05
Shinmera
that would prevent a proper close handshake
16:35:31
phoe
I can't see a handshake there
16:35:39
phoe
https://github.com/Shirakumo/lichat-tcp-server/blob/master/server.lisp#L179
16:35:40
Colleen
github.com/Shirakumo/lichat... Website (HTML), Title: lichat-tcp-server/server.lisp at master · Shirakumo/lichat-tcp-server · GitHub
16:36:10
phoe
but again, I don't know that code too well
16:37:01
Shinmera
the unwind in lichat-serverlib causes it to try and send a close message
16:37:12
Shinmera
if I remember correctly
16:38:50
Shinmera
ech, I don't remember how this clusterfuck is supposed to work
16:39:00
phoe
hold the connection's lock, emit an exit message, handshake, close the socket
16:39:45
phoe
I'm kind of used to Erlang concurrency where everything is async and you can freely pass messages around
16:39:54
Shinmera
Colleen: look up lichat 4.3
16:39:54
Colleen
4.3 connection closure https://shirakumo.github.io/lichat-protocol#4.3_connection_closure
16:41:02
Shinmera
the lichat spec is one thing I'm as close to being proud of something as I ever got
16:41:23
phoe
I'll first try finishing my code
16:41:24
Shinmera
so when in doubt, check that instead of the shitty code
16:41:32
phoe
and then try looking into the spec to understand it
16:41:49
phoe
and then figuring out what's going on in this cluste^Wcode
16:42:31
Shinmera
it's a shitpile and you don't have to be afraid of calling it that
16:43:10
phoe
I'll get to know it better and then decide what to call it
16:43:23
phoe
so far I've enjoyed your code style
16:44:38
Shinmera
the spec should be pretty easy to read, nothing fancy
16:45:21
phoe
Where do you have the implementation code for the wire protocol?
16:45:52
Shinmera
click an to-wire, then on the [src] link
16:46:26
Shinmera
staple is nice like that :^)
16:47:33
phoe
I'll possibly shamelessly steal your wire protocol because it seems to be better than my safe-read library
16:50:14
Shinmera
the null-termination allowing skipping of malicious messages is a real nice touch that I still like
16:50:38
Shinmera
forces encoding of binary though, which may or may not be a problem
16:54:32
Shinmera
just noticed that this has a good use case for :allow-other-keys, heh
17:05:29
phoe
Shinmera: it seems that someone has already done that
17:05:31
phoe
https://quickref.common-lisp.net/quux-hunchentoot.html#Exported-classes
17:05:31
Colleen
quickref.common-lisp.net/qu... Website (HTML), Title: The quux-hunchentoot Reference Manual
17:05:36
phoe
look at thread-pooling-taskmaster
17:06:02
phoe
you should be able to spawn the Hunchentoot acceptor and specify this as the taskmaster
17:06:13
Shinmera
man quickref is maddening to browse
17:06:35
Shinmera
where the fuk is the repo link
17:06:45
phoe
https://gitlab.common-lisp.net/qitab/quux-hunchentoot/blob/master/thread-pooling.lisp
17:06:45
Colleen
gitlab.common-lisp.net/qita... Website (HTML), Title: thread-pooling.lisp · master · qitab / quux-hunchentoot · GitLab