#52 SDRPlay RSP tuner support. (#1453)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2023-02-19 08:21:54 -05:00
committed by GitHub
parent 9abf64c6ab
commit 75347f9d0a
336 changed files with 31841 additions and 264 deletions

View File

@@ -18,12 +18,13 @@
*/
package io.github.dsheirer.sample;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Broadcasts an item to multiple listeners
@@ -100,6 +101,10 @@ public class Broadcaster<T> implements Listener<T>
mListeners.add(listener);
}
}
catch(Exception e)
{
mLog.error("Unexpected error while adding listener", e);
}
finally
{
mLock.unlock();
@@ -120,6 +125,10 @@ public class Broadcaster<T> implements Listener<T>
{
mListeners.remove(listener);
}
catch(Exception e)
{
mLog.error("Unexpected error while removing listener", e);
}
finally
{
mLock.unlock();
@@ -151,6 +160,10 @@ public class Broadcaster<T> implements Listener<T>
listener.receive(t);
}
}
catch(Exception e)
{
mLog.error("Unexpected error while broadcasting to listeners", e);
}
finally
{
mLock.unlock();