Overhaul thread handling
authorPeter Rabbitson <ribasushi@cpan.org>
Thu, 18 Nov 2010 07:56:14 +0000 (08:56 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Thu, 18 Nov 2010 08:12:51 +0000 (09:12 +0100)
commitec6415a9f63389db5a76f593c2d1686015ca95cd
tree70bcb76ce99bf18c27f5f94b0d6c59fe495c4afa
parent7672675a2bafc1ddc0bd4237c01c36acfdcda71c
Overhaul thread handling

Throw away _verify_tid as it happens too late (when a request is fired).
Instead destroy the current $dbh as soon as possible in CLONE and hope for
the best. Also deactivate _verify_pid on Win32 as it silently spawns a
thread in the background (and thus invokes CLONE).
Changes
lib/DBIx/Class.pm
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/Replicated.pm
lib/DBIx/Class/Storage/TxnScopeGuard.pm
t/51threads.t
t/51threadtxn.t
t/storage/txn.t