Prevented muliprocessing
This commit is contained in:
parent
0ea6b8c69b
commit
4e7f3b79a6
@ -9,6 +9,8 @@ import os
|
|||||||
|
|
||||||
from utils import BirbnetesIoTPlatformStatusDriver
|
from utils import BirbnetesIoTPlatformStatusDriver
|
||||||
|
|
||||||
|
from threading import Lock
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Abstract base class for signalprocessor
|
Abstract base class for signalprocessor
|
||||||
"""
|
"""
|
||||||
@ -24,6 +26,8 @@ class SoundSignalProcessor(AbcSignalProcessor):
|
|||||||
SoundSignalProcessor class, responsible for handling the sound signal processor pipeline.
|
SoundSignalProcessor class, responsible for handling the sound signal processor pipeline.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
super_multi_signal_processing_preventor_to_make_queue_great_again = Lock()
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""
|
"""
|
||||||
Create dependency objects.
|
Create dependency objects.
|
||||||
@ -37,6 +41,7 @@ class SoundSignalProcessor(AbcSignalProcessor):
|
|||||||
Process a sound sample.
|
Process a sound sample.
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
with SoundSignalProcessor.super_multi_signal_processing_preventor_to_make_queue_great_again:
|
||||||
soundsample_name = self.soundsensor.getvalue()
|
soundsample_name = self.soundsensor.getvalue()
|
||||||
|
|
||||||
if not soundsample_name: # No new sample... nothing to do
|
if not soundsample_name: # No new sample... nothing to do
|
||||||
|
Loading…
Reference in New Issue
Block a user