ahsing / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

Expose a generic PoolMonitor class #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We use our own ThreadPoolExecutor instead of AsyncTask, so we call 
registerIdlingResources on setUp to monitor the pool for changes. We found that 
most of the logic needed was already implemented in AsyncTaskPoolMonitor, so we 
simply copied the class, made it implement IdlingResource and it worked out of 
the box.

Is there any reason why a generic PoolMonitor class has not been made public 
and AsyncTaskPoolMonitor is package private? Are we doing something wrong?

Original issue reported on code.google.com by fran.sa...@gmail.com on 19 Nov 2013 at 12:54

GoogleCodeExporter commented 9 years ago
It's possible to configure a ThreadPool in such a way that AsyncTaskPoolMonitor 
will not work. We looked into this and decided that this is very difficult to 
generalize. Feel free to contribute something if you think it can be done.

Original comment by vale...@google.com on 16 Dec 2013 at 6:07