4
jestdotty
103d

wrote dumb threading and sockets system to make a bunch of https calls

extracted the working code into nice objects and methods to make it look sane and so I can re-use the code for more complex functionality that builds on itself

now suddenly the threads are locking and not multi-threading anymore

turns out?
the http(s) library expects the tls / https thing in an Arc / atomic reference count
but despite Arc being literally intended and designed for threadwork it seems the library in question throttles / locks itself if they are all using the same Arc (I don't even know how that is possible?)
if I clone the tls / https thing, no throttle / lock issues 😒
why did they even try that lol, they didn't test?!

I really didn't expect to be better at multi-threading than others already. I'm newbie. pls

Comments
Add Comment