Questions tagged as 'thread'

1
answer

Problem when you disable Backgroundworker

I am creating in my main form a BackgroundWorker object and I have two click events, one to activate and the other to disable backgroundWorker, but the method of disable is not working. BackgroundWorker worker; public FrmPrincipal() { Initi...
asked by 06.03.2017 / 22:29
2
answers

Updating object value of a Form by a thread

I need 2 labels in my form to be updated every 1 second, so I made a thread in load of Form : Thread threadUpdate = new Thread(new ThreadStart(UpdateState)); threadUpdate.Start(); And my UpdateState method is found as fo...
asked by 15.07.2014 / 17:04
2
answers

How to use async / await in methods that return void?

I have a problem with my application, where due to the large volume of processing, my Form hangs. During my research I discovered that a async method solves this, but the functions executed on my "execute" button return void, so I...
asked by 09.08.2018 / 18:21
1
answer

How to add elements in Queue continuously?

Below I have a code that it needs to do the following: Create a thread, then start it. When you start the thread, according to the time (random time) the program adds a value in the queue, after being added to the queue, it needs to show how man...
asked by 01.05.2018 / 02:13
1
answer

Thread does not execute

Adding BreakPoints I noticed that the Thread below is not executed. I do the ZIP code search using HTTP, returning a JSON, via the viacep.com webservice. if (cep.length() == 8) { final ProgressDialog dialog = ProgressDialog.show(Inicial.t...
asked by 22.03.2017 / 22:27
1
answer

How to create thread in loop in C #?

How do I create a thread that executes a function, waits 1 second, and then re-runs in loop until the program quits?     
asked by 08.08.2016 / 22:18
1
answer

What is Runnable for?

I was thinking about creating thread one in my software, but I saw in the forums that Runnable helped in some way to create a thread , and wanted to understand how it works.     
asked by 21.04.2016 / 16:29
1
answer

Thread Problems on Android

I have listview to be populated / powered by a webservice , but only load my images with a Handler. I want to use a Thread, but it only runs with a Handler and I do not understand why ... Can someone help me? Here is the cod...
asked by 08.03.2014 / 02:08
1
answer

Using threads in classes

Hello, I have a problem with using threads. Since I use mingw to compile my projects, and this header is not implemented, I use this header to compile my projects. However, I'm having some difficulties regarding the use of thread...
asked by 13.07.2018 / 11:52
1
answer

Python asyncio and threading

I am studying the module asyncio of Python and there is the function run_coroutine_threadsafe which should be run on a thread other than the event loop. Here's my script: #!usr/bin/python3 # -*- coding: utf-8 -*- import asyn...
asked by 15.08.2018 / 02:53