1

My program flow is like this:
I need to sequential processing per user's request
In C++ I will use boost asio and one strand per user but I had to code in java
So I intend to create one SingleThreadExecutor per user and post user's task into it's executor
But if user num get big I think this approach will slow because of the big number of thread
So I looking for alternative solution, the other approach in my head is one queue per user and some how tosh that queue to a fixed thread pool, need advise here, thanks.

Nhu Phuong
  • 427
  • 2
  • 6
  • 15

1 Answers1

0

Found solution just 5 minute after I post question T_T
It's here, CallbackTask approach look promising.

Community
  • 1
  • 1
Nhu Phuong
  • 427
  • 2
  • 6
  • 15