def _buffer_recv_worker(rt_client, nchan):
    """Worker thread that constantly receives buffers"""
    try:
        for raw_buffer in rt_client.raw_buffers(nchan):
            rt_client._push_raw_buffer(raw_buffer)
    except RuntimeError as err:
        # something is wrong, the server stopped (or something)
        rt_client._recv_thread = None
        print('Buffer receive thread stopped: %s' % err)
dataset/ETHPy150Open mne-tools/mne-python/mne/realtime/client.py/_buffer_recv_worker/original