Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RtlsdrAio improvements #52

Merged
merged 23 commits into from Sep 26, 2016
Merged

RtlsdrAio improvements #52

merged 23 commits into from Sep 26, 2016

Conversation

nocarryr
Copy link
Collaborator

@nocarryr nocarryr commented Sep 25, 2016

These are mostly fixes for bugs that were encountered when using the subprocessing and multi-threading
methods that work behind the scenes in py-test (while trying to tackle something mostly unrelated to asyncio).

Since the read_bytes_async is called in an Executor, it seems appropriate to ensure that all of the async functions can be handled properly when the stop() method is called.

  • Place samples received from the _callback into the queue using a coroutine.
  • Catch exception raised if the queue is full (asyncio.QueueFull) and log the error.
  • Use coroutines to start and stop AsyncCallbackIter to ensure that all remaining coroutines can be "awaited"
  • Update the test case to await the stop() method, add test for read_bytes_async
  • Update the example in the README to include the await expression for stop()

This PR has a lot of ugly commits from fighting with travis-ci and its outdated default python3.5 package (3.5.0.. current stable is 3.5.2). As such, I think it should be a squash merge.

@coveralls
Copy link

coveralls commented Sep 25, 2016

Coverage Status

Coverage decreased (-0.1%) to 85.958% when pulling d4bc47f on nocarryr:aio-changes into 3479723 on roger-:master.

@coveralls
Copy link

coveralls commented Sep 26, 2016

Coverage Status

Coverage increased (+0.2%) to 86.325% when pulling 94207fb on nocarryr:aio-changes into 3479723 on roger-:master.

@nocarryr nocarryr merged commit 91a9119 into pyrtlsdr:master Sep 26, 2016
@nocarryr nocarryr mentioned this pull request Nov 9, 2016
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants