简体   繁体   中英

What is the best option for managing tasks

I have thousands of user's and for every one of them I have a few hundred tasks that need to be done. Because I do not want to finish with one user and all the others will wait, what my best option to run them all at the same time so if I have user with two tasks, so he did not wait for user that has 100 tasks, and of course, if there user that enters the queue but he in 100 place, for example, so I do not want him to wait for all the 99 users before him to finish. What's my best option doing that in JAVA?

Thanks.

You need to use Threads.

I suggest you run a diffrent thread for each user, that way a user with only few thread will not wait for others to finish.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM