Dateien hochladen nach „REST/old“

Lock Object
main
Thomas Hassenstein 2023-06-13 17:39:09 +02:00
parent f0e0813414
commit 48d201f964
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@ def get_random_numbers():
if not initialized: if not initialized:
return create_response(432, 'System not ready; try init') 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) random_numbers = analyze_data(int(quantity), int(bits), startup=False)
if random_numbers == 400: if random_numbers == 400: