Commit e711de2a authored by zljing's avatar zljing
Browse files

ensure all threads end and fix NPE

1 When there exception happens, main function exits but
some submitted tasks will run and get cleared
local variables, which will cause NPE. So change the
condition to wait all submitted tasks exit.
2 When there uncatched exception happens in the
ThreadPoolExecutor, current thread will be destoryed
and new thread will be created, which will cause index
out of bounds. So add bound check.

Change-Id: I9a8360efadddfb0cac8bba4c746754a4d7886363
CRs-Fixed: 2223180
parent 0342733b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment