From 42f5594a8c887bf3030de9a959b189dadf8826a1 Mon Sep 17 00:00:00 2001 From: David Schmidt Date: Wed, 29 Oct 2014 17:09:18 +0100 Subject: [PATCH] FAQ update: DBIC and fork/threads --- lib/DBIx/Class/Manual/FAQ.pod | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index 4a78e24d8..5fe0ffb1f 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -610,6 +610,16 @@ The dirty way: return $self->result_source->schema->resultset('Server')->search({ ... }); }; +=item DBIC and fork/threads + +L is thread- and fork-safe. Including threads-masked-as-forks on win32. + +Each L instance has its own dbh. L does the right +thing and safely reconnects if a thread or process context change is detected. + +In-progress cursor access from a different thread/fork is also detected and an +exception is thrown. + =back =head2 Notes for CDBI users