thread

Clients do not communicate in the same multiplayer game in Java

I'm trying to make a simple multiplayer tank game implementing chat. The game and the chat are all ok! However, I can't get 2 ... [] args) throws IOException { Cliente app = new Cliente(); app.conectar(); app.escutar(); } }

Concurrent programming

Hello, I'm having a hard time finding the error in the code below. It is a problem in which ideally, having 5 vacancies avail ... thread_join(s[i],NULL); } for (i = 0; i < ESTAGIARIOS ; i++) { pthread_join(e[i],NULL); } return 0; }

Java programming with threads

Staff I need help with an Activity: Consider three number vectors. Write a program to print out which twin prime numbe ... ow new RuntimeException("Não há nenhum numero primo gemeos "); } Can someone make a code and explain me with comments?

How do I use threads or something like that in this code?

Guys I was needing to use the Threads (or something that does not crash the program while the code does not finish running) i ... deos") so how do I solve this? Guys for a while breaking heads with this, if you can help solve this I thank you very much.

Very fickle output in multithreaded application along with exception

I'm seeing threads now and doing some experiments. It is a simple test, I want to print in the console ten times the name of ... 10; i ++){ this.lista.add(Thread.currentThread().getName()); } } } }

How to instantiate objects in shared memory?

I have an application in which there are multiple parallelization modes. However, when I will parallelize through fork () th ... l_array, index_generator_template->clone(id))); ParalelizationMode::barrier->wait(); if (pid == 0) exit(0); }

Draw an image pixel by pixel

I'm trying to make a little beast program but I'm not getting it. I want to redraw an image pixel by pixel randomly, doing th ... intStackTrace(); } } } finally { threadFinished(); } } }

Do I really need to start from a main to run a schedule in java?

I am developing a web application, and now I have reached a point where I will have a process running in parallel in my appli ... , but it does not rotate on schedule, and when taking the main I have the error. (Edit: I'm running on a common Tomcat)

What's the difference between passing nil in the synchronize / queue of a Task / Thread?

In most examples I found the structure of a basic Task is: procedure var FTask : ITask; begin FTask := TTask.Run( proc ... tThread is passed nil, What's the difference? How does it work? Will the OS decide on its own which Thread will run the code?

What is the need for a while in a producer-consumer?

I'm used to programming using this while in problems involving synchronization of threds for this is how API's usually ask t ... erstand the need for this unlock/lock inside wait. Can anyone clarify these two doubts for me? If possible, exemplify in C.

How to see the percentage of cpu usage of each thread of a java process

Well, I have a cpu usage problem, and I don't know exactly which class or Thread it is consuming ( there is no way to know ex ... t have access to the terminal, I need to know the information through code, (or some other means of seeing this information)

How does synchronization work in Java?

What is the advantage of having two threads , that run at the same time but that one waits for the other to complete to run? ... run after the end of the other. In this case, what is the advantage of using the thread instead of a single-task application?

Is there any relationship of thread, pipeline and cores?

Is there any relationship between these elements (thread, pipeline and CPU core)? I saw that the pipeline helps a lot whe ... ey have any relation, what would they be? Source - page 27-28 (increasing performance with Pipeline, pipeline limitations)

Relationship of threads to the number of processors

In the image below my task manager there are 3058 Threads. My processor has 4 threads. Does this mean that of these 3058 it will run from 4 to 4 threads? My Processor has 4 cores and 4 threads, does this mean that for each core it has 4 threads?

Java Thread-read / write file-JAVA

Opa galera beleza? I need to read a txt file where each line is a cpf or cnpj, calculate their checker digit and then write ... rArq.println(n); } static boolean verificaEhCpf(String numero) { return numero.length() == 9; } }

How to decrease runtime using openmp

I wanted to know what I can do to decrease runtime using Openmp threads. I made a code to add the values of a vector of size ... on(+:soma) for(i=0; i<N; i++){ soma += vet[i]; } printf("Resultado: %ld\n", soma); return 0; }

Asynchronous alternative to Thread.Sleep without crashing application in C# [duplicate]

this question already has an answer here : ... ication, mainly using in loops. So here's a tip on how to wait for a period you want without causing any application crashes.

Program uses the threading module but I did not notice any parallelism in the execution. What's wrong?

I made a script to decrease the quality of some mp3 by calling the ffmpeg program through the subprocess module. I added Thre ... _Madhya_lila_22_66_Aula_102.mp3"]) MeuConversor1.start() MeuConversor2.start() MeuConversor3.start() MeuConversor4.start()