Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store handles by PID (and TID, if running under threads), so that no two processes/threads could receive the same handle. I'd previously not thought this was a problem since if Dancer is going to fork, it does so when a request starts, but if the database() keyword was used at runtime as the app starts rather than in a route handler, dragons could lie ahead. Also, if running under mod_perl + mpm_worker, or on Windows, where forking is imitated with threads. Thanks to mst for hitting me with the cluebat on this one. Considering overhauling to use DBIx::Connector, but I think that may be overkill and require more effort and potential API changes than it may be worth. More thought on that required; comments welcome.
- Loading branch information