After using forkjoinpool with parallel stream, code after futureTask met multi-thread problem

前端 未结 0 2012
故里飘歌
故里飘歌 2021-01-05 13:46

I want to use parallel stream api to read redis, get all items, and randomly sample 10% out of all items. But I found it sometimes throws exception says random.nextInt

相关标签:
回答
  • 消灭零回复
提交回复
热议问题