Questions tagged as 'thread'

1
answer

QThreads on QT Creator

I created a server in QT Creator, and I also implemented the Threads service on it. But when I connect to the server with the application "Client" and send a data, the server does not receive ... It should receive and print the received data, bu...
asked by 21.08.2015 / 21:18
1
answer

Doubt Multithreading in C #

I have the following scenario: You can create three types of threads in the program, imagine that they are A, B and C. I have to respect the following rule: A C thread can not access the critical region if there are already one or more B...
asked by 08.12.2014 / 19:24
1
answer

C # ManualResetEvent

What does the ManualResetEvent connectDone serve in the code below? If I use it, when running the main thread hangs, as I am using this code inside the Unity3D (game engine) it locks the whole process and this can not occur. What is the real...
asked by 10.06.2014 / 17:47
1
answer

Thread independent from the result

I have a query where returns a list of results; Example: 192.168.1.2 192.168.1.3 192.168.1.4 192.168.1.5 I would like to start from this list creating a thread for each one independent. For each one to do its processing. Currently I u...
asked by 19.06.2018 / 21:31
1
answer

Problems with Traffic Lights (Producer / Consumer)

Hello! I am trying to solve the Problem of the Producer / Consumer using traffic lights, but I am having difficulties. I'm using one producer thread and one consumer thread, but I think the program is initializing the producer and not doing the...
asked by 11.10.2017 / 13:45
1
answer

Barriers with threads - Output code excerpt

I have the following code snippet. Can someone explain the following question to me? In main when I create the two threads, I go to the Boat constructor and notice that it sleeps a second. Why is it main that assumes this...
asked by 04.01.2017 / 01:18
1
answer

Start Thread with Input Parameters for Void Method

I tried to initialize a Thread that has the function of processing a certain information by a method, so that the main execution line of the program keeps running. But I need to pass two values to this method. The fragment of the method that wil...
asked by 02.08.2016 / 17:03
1
answer

Thread - How to use it without freezing screen?

I have a system that traverses some html elements, collecting some links. I would like for a wait time, but whenever I use Thread.Sleep it freezes my program by the time set. I have already used Application.DoEvents (); and Thread.Join and non...
asked by 29.01.2016 / 02:03
1
answer

Is it possible to shorten the startup time of my application?

I've seen a lot of things here and StackOverflow in English about Swing and Runnable , even though I could not solve my problem. I am developing a work for college (interdisciplinary work, involving Distributed Systems / Advanced Data S...
asked by 12.10.2015 / 04:01
1
answer

Task.Run locking inside a "tick" (Forms.Timer)

In my application, I created a "Timer" (System.Windows.Forms) that runs every 1 second. In the "tick" event, I put a await Task.Run. For some reason the tick stops running after a while (because it does not print the date and time on the cons...
asked by 01.09.2015 / 21:55