MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / run

Method run

src/main/java/com/rtg/util/WorkerThread.java:104–132  ·  view source on GitHub ↗

Runs jobs in the job queue

()

Source from the content-addressed store, hash-verified

102 * Runs jobs in the job queue
103 */
104 @Override
105 public void run() {
106 while (!mDie) {
107 synchronized (mJobSync) {
108 if (hasJob()) {
109 final Runnable job = mJob;
110 try {
111 job.run();
112 } catch (final Throwable t) {
113 Diagnostic.error(ErrorType.SLIM_ERROR);
114 Diagnostic.userLog(t);
115 }
116 synchronized (mCompleteNotify) {
117 setJob(null);
118 mCompleteNotify.notifyAll();
119 }
120 }
121 }
122 synchronized (mSleepSync) {
123 try {
124 if (!hasJob() && !mDie) {
125 mSleepSync.wait(SLEEP_TIME);
126 }
127 } catch (final InterruptedException e) {
128 //no problem
129 }
130 }
131 }
132 }
133}

Callers

nothing calls this directly

Calls 6

hasJobMethod · 0.95
errorMethod · 0.95
userLogMethod · 0.95
setJobMethod · 0.95
notifyAllMethod · 0.80
runMethod · 0.65

Tested by

no test coverage detected