Holy shit I spent two hours rewriting a Rust struct to make it `Sync + Send` to be able to use it between threads, but now I discover a dependency I'm using is not `Send` and therefore the whole struct cannot be sent between threads safely in any way kill me
Conversation
Notices
-
Embed this notice
Lorenzo (ranfdev@linuxrocks.online)'s status on Sunday, 17-Nov-2024 04:45:45 JST Lorenzo -
Embed this notice
Lorenzo (ranfdev@linuxrocks.online)'s status on Sunday, 17-Nov-2024 05:26:13 JST Lorenzo @wizzwizz4 It's an sqlite dependency that apparently wants to work even when sqlite is compiled as single thread only, so it doesn't implement `Send`.
I could have switched to another dependencies, but now I'm trying to rewrite my struct as an actor that lives in its own thread and just sends messages to other threads. In my case this also simplifies other things.
But it's a pain to wrap everything in messages, so I'm letting Claude (the LLM) do the work...
-
Embed this notice
wizzwizz4 (wizzwizz4@fosstodon.org)'s status on Sunday, 17-Nov-2024 05:26:14 JST wizzwizz4 @ranfdev Is that inherent to the problem domain (e.g. graphics shenanigans), or just the dependency being bad?
alcinnz repeated this.
-
Embed this notice