From 48d201f964b93e1f0fdcca9bb3e93046a575ffe6 Mon Sep 17 00:00:00 2001 From: Thomas Hassenstein <2021544@stud.hs-mannheim.de> Date: Tue, 13 Jun 2023 17:39:09 +0200 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9EREST/old?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lock Object --- REST/old/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/REST/old/app.py b/REST/old/app.py index 0d25889..ddd96db 100644 --- a/REST/old/app.py +++ b/REST/old/app.py @@ -50,7 +50,8 @@ def get_random_numbers(): if not initialized: return create_response(432, 'System not ready; try init') - + + with lock: # Sperre (Lock) verwenden, um sicherzustellen, dass nur ein Thread die Methode ausführt random_numbers = analyze_data(int(quantity), int(bits), startup=False) if random_numbers == 400: