Răsfoiți Sursa

Merge pull request #885 from Avaiga/feature/change-lock-type

:zap: replace multiprocessing.Lock by threading.Lock
Jean-Robin 1 an în urmă
părinte
comite
9fcb5ebb76

+ 0 - 1
taipy/core/_orchestrator/_dispatcher/_task_function_wrapper.py

@@ -67,7 +67,6 @@ class _TaskFunctionWrapper:
                     try:
                     try:
                         data_node = data_manager._get(dn.id)
                         data_node = data_manager._get(dn.id)
                         data_node.write(res, job_id=job_id)
                         data_node.write(res, job_id=job_id)
-                        data_manager._set(data_node)
                     except Exception as e:
                     except Exception as e:
                         logger.error("Error during write", exc_info=1)
                         logger.error("Error during write", exc_info=1)
                         exceptions.append(DataNodeWritingError(f"Error writing in datanode id {dn.id}: {e}"))
                         exceptions.append(DataNodeWritingError(f"Error writing in datanode id {dn.id}: {e}"))

+ 1 - 1
taipy/core/_orchestrator/_orchestrator.py

@@ -11,8 +11,8 @@
 
 
 import itertools
 import itertools
 from datetime import datetime
 from datetime import datetime
-from multiprocessing import Lock
 from queue import Queue
 from queue import Queue
+from threading import Lock
 from time import sleep
 from time import sleep
 from typing import Callable, Iterable, List, Optional, Set, Union
 from typing import Callable, Iterable, List, Optional, Set, Union
 
 

+ 0 - 3
tests/core/version/test_production_version_migration.py

@@ -9,7 +9,6 @@
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 # specific language governing permissions and limitations under the License.
 # specific language governing permissions and limitations under the License.
 
 
-import multiprocessing
 from unittest.mock import patch
 from unittest.mock import patch
 
 
 import pytest
 import pytest
@@ -20,8 +19,6 @@ from taipy.core.data._data_manager import _DataManager
 from taipy.core.scenario._scenario_manager import _ScenarioManager
 from taipy.core.scenario._scenario_manager import _ScenarioManager
 from tests.core.utils import assert_true_after_time
 from tests.core.utils import assert_true_after_time
 
 
-m = multiprocessing.Manager()
-
 
 
 def twice(a):
 def twice(a):
     return a * 2
     return a * 2