en.osm.town is one of the many independent Mastodon servers you can use to participate in the fediverse.
An independent, community of OpenStreetMap people on the Fediverse/Mastodon. Funding graciously provided by the OpenStreetMap Foundation.

Server stats:

272
active users

Amᵃᵖanda 🔜 FOSSGIS

istg `rusqlite`s a nice library (a library for obv), but arg do they make it hard to pass things around between threads or whatever.

I just wanna have one thing pumping out results from this SQL query, and then parallel processing it. bah!

@amapanda I fully agree on that, but that is an artifact of SQLite itself not supporting multithreading. My solution for that is having one thread being the one that interacts with the database and then using channels to get the data where it needs to be.

I haven’t implemented it for writing yet, but for reading (SQLite to web service) it works quite well.

Of course you then have the channel overhead to deal with … either that or mutex locking …

(I hope you were looking for advice, if not, apologies :drgn_blep:)

@amapanda channels maybe? Usually works well for this sort of fan out.