By reset/reinit on startup, I assume you’re thinking of how you handle safely forking? E.g. SQLAlchemy’s engine.dispose() post-fork
With forked workers, everything is kept separate, but forking breaks file handles (which includes network connections), which is why you need to reset things like SQLAlchemy.
Threaded workers are a different beast, anything application-level will be shared among all threads.
Generally I use non-thread-safe things as reified properties in the request object.
config.add_request_method(lambda _: Http(), ‘ghttp’, reified=True)
That will create a new object per request and avoid any threading issues.
If per-request is too expensive, you could use a threadlocal, but that’s much more complicated.