P
P
Powerbute2022-01-06 19:14:59
Java
Powerbute, 2022-01-06 19:14:59

[Java] Sending a task to another thread that was started earlier. Is it possible to?

Is it possible to make such a scheme? When the program starts, a second thread is started. Further, during the execution of actions, send some actions to the same second thread.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Roo, 2022-01-06
@xez

Maybe

A
AlexVWill, 2022-01-06
@AlexVWill

send some actions to the same second thread

some are what? ;) you can pass data there, you can get data from there, you can run an asynchronous task, and so on...
for example, run part of the task as a service... https://developer.android.com/guide/components/services

A
Alexey Cheremisin, 2022-01-07
@leahch

Looking at classes in java.concurent.util

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question