Commit 39f51130 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[john snow] reorder tasks

Issue both pos and lemma tasks, then wait for both. This is a bit
better „parallelization” than: issue pos, wait for it, issue lemma,
wait for it.
parent 97d74a5e
......@@ -174,9 +174,10 @@ waitForJsTask jsTask = wait' 0
getPosTagAndLems :: Lang -> Text -> IO PosSentences
getPosTagAndLems _l t = do
jsPosTask <- jsRequest t JSPOS
jsPos <- waitForJsTask jsPosTask
jsLemmaTask <- jsRequest t JSLemma
-- wait for both tasks
jsPos <- waitForJsTask jsPosTask
jsLemma <- waitForJsTask jsLemmaTask
printDebug "[getPosTagAndLems] sentences" $ jsAsyncTaskResponseToSentences jsPos jsLemma
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment