#1837 Channel Stream Thread Naming With Channel Config Number, Protocol and Frequency (#1838)

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2024-02-10 07:30:33 -05:00
committed by GitHub
parent aeeed71231
commit 4d7a8e5980
19 changed files with 125 additions and 78 deletions

View File

@@ -44,7 +44,7 @@ public class Dispatcher<E> implements Listener<E>
private final LinkedTransferQueue<E> mQueue = new LinkedTransferQueue<>();
private Listener<E> mListener;
private final AtomicBoolean mRunning = new AtomicBoolean();
private final String mThreadName;
private String mThreadName;
private ScheduledExecutorService mExecutorService;
private ScheduledFuture<?> mScheduledFuture;
private final long mInterval;
@@ -73,6 +73,15 @@ public class Dispatcher<E> implements Listener<E>
mInterval = interval;
}
/**
* Sets the thread name. If this dispatcher is already started, this has no effect.
* @param threadName to use for this dispatcher.
*/
public void setThreadName(String threadName)
{
mThreadName = threadName;
}
/**
* Sets or changes the listener to receive buffers from this processor.
* @param listener to receive buffers