Skip to content

Commit

Permalink
start threads
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Jun 30, 2018
1 parent 10ed946 commit 11c16fc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions miner/src/Arktika.java
Expand Up @@ -129,6 +129,7 @@ public Arktika(Config config) throws Exception

subscribe();


}

private ManagedChannel channel;
Expand Down Expand Up @@ -441,7 +442,22 @@ private void loadField() throws Exception
throw new RuntimeException("No sources seem to have the deck files.");
}
composit_source = new FieldSourceComposit(ImmutableList.copyOf(all_sources));


long total_words = params.getSnowFieldInfo(selected_field).getLength() / SnowMerkle.HASH_LEN_LONG;
// START THREADS
for(int x=0; x<layer_count; x++)
{
FieldSource fs = all_sources[x];
int thread_count = thread_counts.get(x);
for(int i=0; i<thread_count; i++)
{
new LayerWorkThread(this, fs, layer_to_queue_map.get(x), total_words).start();
}
}

}

public void enqueue(int chunk, PartialWork work)
{
MinMaxPriorityQueue<PartialWork> q = chunk_to_queue_map.get(chunk);
Expand All @@ -453,4 +469,5 @@ public void enqueue(int chunk, PartialWork work)
}



}

0 comments on commit 11c16fc

Please sign in to comment.