Questions tagged as 'thread'

1
answer

Run parallel code snippets

Hello, I wanted to know how to execute one thread after another for a certain time, for example: Thread x = new Thread(() -> { // qualquer código, pode ter até um while(true)... }); Thread x2 = new Thread(() -> { // qualquer código, pode...
asked by 11.06.2017 / 22:46
1
answer

C # Return Values of a Thread

I created a database connection class that I want to use Thread to make queries faster. In functions ExecutarSelect and ExecutarSQLPiece I have returns, but I could not get those returns through the thread. I did a sea...
asked by 24.02.2016 / 19:58
1
answer

How to run an application in multiple threads?

I'm developing an application with interface made by Swing. The purpose of the application is to simulate a computer network in which I will monitor using the InetAddress implementation. Well, I created my interface, where the user regist...
asked by 25.08.2016 / 15:15
1
answer

Error code repeating values in threads?

#include <pthread.h> #include <stdio.h> void *Operacao(void *soma) { int n; printf(“Digite o primeiro numero:”); scanf("%d", &n); printf(“Digite o segundo numero:”); scanf("%d", &n); printf(“A soma e:%d”, n + n); pthread_exit...
asked by 06.05.2018 / 03:35
1
answer

Future Call with type Void [closed]

Situation I needed to print a pdf report via a void method that would return the response and after printing on the screen it became necessary to invalidate the permission key directly in the database. Problem Shortly after the prin...
asked by 28.02.2018 / 20:24
1
answer

Problems with three forms and picture box

Hi, my scenario is as follows: - Configuration form (name, email and a photo) - Form ABC - which has a form that is opened by clicking on a Button on the ABC form - BCA Form - which has a form that is opened by clicking on a Button on the BCA fo...
asked by 12.04.2016 / 20:00
1
answer

ProgressBar using Threads and SceneBiulder

I'm doing a job, and I wanted to know in a simple way how I solve this, I'm doing a simple program in it's almost a game, basically you push a button, the progress bar starts to grow, and adds 1 point to a Label. but when I put it to work, it do...
asked by 09.11.2018 / 18:41
1
answer

Error Exception in thread "main" java.lang.NullPointerException

So, I'm trying to make a program that adds 2 vectors via Thread , but it gives the following error:    Exception in thread "main" java.lang.NullPointerException       at Soma (Main.java:37)       at Main.main (Main.java:7) I wante...
asked by 22.08.2016 / 01:17
2
answers

How do I query in a database from a thread? [closed]

A teacher asked to develop a project (a CRUD of cars). I've done the insert, remove, list, and change part. But the list part must be done by a thread (teacher's requirement), where it must list a car every 20 seconds and show in JTextArea...
asked by 02.11.2017 / 22:16