Debian Codegraph @

current/sketch/AlignmentJob.java

raw symbols SCIP
1 package sketch;
2
3 import java.util.concurrent.ArrayBlockingQueue;
4
5 public class AlignmentJob {
6
7 AlignmentJob(Comparison c_, ArrayBlockingQueue<Comparison> dest_){
8 c=c_;
9 dest=dest_;
10 }
11
12 void doWork(){
13 assert(!isPoison());
14 try {
15 c.ssuIdentity();
16 }catch (Throwable t){
17 t.printStackTrace();
18 }
19 put();
20 }
21
22 private void put(){
23 boolean success=false;
24 while(!success){
25 try {
26 dest.put(c);
27 success=true;
28 } catch (InterruptedException e) {
29 // TODO Auto-generated catch block
30 e.printStackTrace();
31 }
32 }
33 }
34
35 final boolean isPoison(){return c==null;}
36
37 final Comparison c;
38 final ArrayBlockingQueue<Comparison> dest;
39
40 }