Questions tagged as 'thread'

1
answer

c #: using threads in a "windows forms" project

In my application I have several "subprocesses". All of them issue information in which they are displayed on the Form. I used System.Windows.Forms.Timer : Class x { public Timer timer {get; set;} public void f() {...
asked by 17.06.2015 / 01:21
0
answers

Problem with focus setting of Ubuntu windows when using Java [closed]

I was doing a program where a circle is drawn on the screen and it moves around the screen, using the JFrame classes to create the window, a thread to control the circle that I enter on the screen. > The problem however is when I...
asked by 03.07.2014 / 14:00
1
answer

How to implement a thread queue to run one after another?

I have a static method to write logs to my system. public class Logger { public static void SaveLog(string[] lines) { System.IO.File.WriteAllLines(@"C:\...\Temp\ExceptLog.txt", lines); } } The method is used in several p...
asked by 19.06.2014 / 05:12
2
answers

Do threads share the same memory address as a method of an object?

I looked here in the OS only that I did not find anything like the doubt I have. I have a Java program that uses Threads . public class Objeto { int i; public Objeto() { i = 0; } public void Foo() { i++; Sy...
asked by 20.06.2016 / 17:21
2
answers

How to display a Toast within a Thread on Android?

I'm developing an application and I needed to display a Toast at some point inside a Thread, but I'm not getting it, does anyone know how it's possible and if it's possible to do so? Thank you in advance. Note: if it is not a toast, it could...
asked by 28.10.2015 / 15:19
2
answers

How to retrieve the return result of a routine from within a Thread?

I need to run a routine inside a Thread, and get the return of this method. My code is this way. class Main { public static void main(String[] args) { String resultado = ""; Thread t = new Thread() { @Override...
asked by 03.07.2015 / 12:39
2
answers

How to create an Anonymous Thread in Delphi

I would like to know how to create an Anonymous Thread in Delphi, if I can show an example I'll be grateful.     
asked by 23.12.2015 / 21:14
2
answers

Ending a Thread

When firing multiple% s of% s in a specific loop, at the completion of each, does Thread open in need of a "close" or is it terminated automatically? for(int i=0;i<=10;i++){ Process ps = new Process(); Thread thread = new Thr...
asked by 27.12.2016 / 13:26
2
answers

Two threads executing the same function

I have a situation where in Delphi I have two threads that execute a function that pings a Firebird database. I use this to sync data from my POS (sending and receiving). But as they run at the same time sometimes a dead lock occurs in the...
asked by 11.09.2015 / 14:18
1
answer

Can not create an ActiveX control instance because the current thread is not in an STA

I'm trying to access a website through the WebBrowser and this morning suddenly the following error appeared    You can not create an instance of the ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' because the current thread is not in...
asked by 31.07.2017 / 17:00