From 84d37457dd50a1c71249ca6ea91c2d26a234d31a Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 25 Feb 2011 16:00:18 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.conversion.session.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.conversion.session.php b/inc/ws/Controlleur/class.ws.conversion.session.php index 5ffc58668..a04ae6528 100644 --- a/inc/ws/Controlleur/class.ws.conversion.session.php +++ b/inc/ws/Controlleur/class.ws.conversion.session.php @@ -19,7 +19,7 @@ class wsConversionSession { protected $bookId = null; public $reload = false; - protected $nb_threads = 4; + protected $nb_threads = 8; protected $threads; public function __construct($guid) @@ -63,7 +63,7 @@ class wsConversionSession { protected function initThreads() { - if (!cubeThread::available()) { + if (!cubeThread::available() || $this->nb_threads <= 1) { return; } $this->threads = array(); @@ -106,7 +106,7 @@ class wsConversionSession { $this->setProgress(($this->processedPages / $this->totalPages) * 100); - if (cubeThread::available()) { + if (cubeThread::available() && $this->nb_threads > 1) { $t = $this->threads[$i % $this->nb_threads]; while ($t->isAlive()) { usleep(100000); @@ -126,11 +126,11 @@ class wsConversionSession { } $this->setProgress(($this->processedPages / $this->totalPages) * 100); - $doc = $dao->updateFromObject($doc); + $this->currentDoc = $dao->updateFromObject($this->currentDoc); if (!$this->reload) { // On n'ajoute les fichiers à la fin du fluidbook que si l'on // n'est pas en train de recharger le fluidbook - $daoBook->appendDocument($this->bookId, $doc->document_id); + $daoBook->appendDocument($this->bookId, $this->currentDoc->document_id); } $this->processedDoc++; } -- 2.39.5