Skip to content

Commit

Permalink
Tell couchbase to reattach threads if needed, before preparing to fork
Browse files Browse the repository at this point in the history
  • Loading branch information
srjlewis committed Jul 29, 2024
1 parent d25bbe7 commit f7b061d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Phpfastcache/Extensions/Drivers/Couchbasev4/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ public static function prepareToFork(): void
}

if (\version_compare(static::$extVersion, '4.2.1', '>=')) {
if (static::$prepareToForkPPID) {
if (static::$prepareToForkPPID === \posix_getpid()) {
Cluster::notifyFork(ForkEvent::PARENT);
} else {
Cluster::notifyFork(ForkEvent::CHILD);
}
}
Cluster::notifyFork(ForkEvent::PREPARE);
}

Expand Down

0 comments on commit f7b061d

Please sign in to comment.