Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/current/sketch/AlignmentJob.java @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
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 } |