locked
Doubts regarding the use of threads and parallel tasks. RRS feed

  • Question

  • User662762443 posted

    Friends, I have the following problem, I have a spreadsheet that consists of a single judicial number for 2 people, but this spreadsheet has too many court cases related to other people, not having another relationship of these authors with a single process. But when I import these worksheets into my database, if I have two people related to the same process, it ends up generating a code of the same process for these two people, and the idea was to generate only 1 code, I suspect that my Problem is not the database, but in my code, because I'm reading the first 100 lines, and Breaking into 10 threads, I believe my problem is in that part, because my spreadsheets come with 670 to 980, and a process can come for these two people, but when importing this generating the process code for these two people, and this can not. I believe that by dividing the lines and playing in 10 threads, this happens. Can you guide me through kindness?

    Thursday, July 19, 2018 8:32 PM

All replies

  • User283571144 posted

    Hi rtaVix,

    rtaVix

    ut when I import these worksheets into my database, if I have two people related to the same process, it ends up generating a code of the same process for these two people, and the idea was to generate only 1 code, I suspect that my Problem is not the database, but in my code, because I'm reading the first 100 lines, and Breaking into 10 threads, I believe my problem is in that part, because my spreadsheets come with 670 to 980, and a process can come for these two people, but when importing this generating the process code for these two people, and this can not.

    According to your description, I couldn't understand your issue clearly.

    Could you please tell what's the meaning about generate a code for two people?

    Do you mean you have two people use the codes?

    If you could post more details information. it will be more easily for us to understand your issue.

    Best Regards,

    Brando

     

    Saturday, July 21, 2018 1:52 AM
  • User662762443 posted

    Brando ZWZ Me desculpe por não me expressar corretamente, por acaso estou aplicando a metodologia de threads no meu projeto, mas eu estava passando por falhas. Por exemplo, tenho 60 registros em uma planilha. Destes 60 registros, eu tenho um número de processo para 2 pessoas, mas os dados podem começar com a primeira linha, a linha do meio ou a última linha. Quando o encadeamento é executado, ele o divide em 10 encadeamentos e, ao fazer isso, esse processo relacionado às duas pessoas, ao inserir no banco de dados, estava gerando código sequencial para o mesmo processo, duplicando os registros. Pesquisando nos fóruns, encontrei a solução para este problema, caso estivesse encadeando o método join usando o join, quando o thread principal é executado, ele só deve ser finalizado quando os outros diários completarem as tarefas paralelas e inserirem no banco de dados resolvi meu problema.

    Monday, July 23, 2018 4:27 PM