paleolimbot commented on issue #1071: URL: https://github.com/apache/sedona-db/issues/1071#issuecomment-5050284088
The decision to use an `Arc<Runtime>` instead of a single static runtime like everybody else was a little historical (it's how the first draft of the ADBC driver did this and I just copied that) and a little because I like avoiding dependence on global statics (once all your code assumes a global static exists, it's tricky to refactor everything to come back from that). Reducing the number of runtimes would be good (e.g., a oncelock that is an Arc runtime), but it would be nice to keep the plumbing that passes the `Arc<Runtime>` around because there may be some options related to a runtime that end up being important when creating it (that could be tweaked per connection), and/or our multiple runtimes might be isolating the thread-local caches or configuration state by launching a whack of worker threads on each connection. Probably a global `OnceLock<Arc<Runtime>>` + option to create a new runtime on `connect()` (that we can keep on in our extension tests to make sure we still handle this case)? Or if this is truly blocking free threaded wheels, we can retreat to just using global runtimes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
