<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop(self):
 """ Stop the reader """

        # print('stopping NonBlockingStreamReader..')
        # print('acquire..')
        NonBlockingStreamReader._stream_mtx.acquire()
        # print('acquire..ok')
        NonBlockingStreamReader._streams.remove(self._descriptor)
        if not NonBlockingStreamReader._streams:
            NonBlockingStreamReader._run_flag = False
        # print('release..')
        NonBlockingStreamReader._stream_mtx.release()
        # print('release..ok')
        if NonBlockingStreamReader._run_flag is False:
            # print('join..')
            NonBlockingStreamReader._rt.join()
            # print('join..ok')
            del NonBlockingStreamReader._rt
            NonBlockingStreamReader._rt = None