TooManyThreadsError

by Retired on ‎02-16-2010 11:16 AM - edited on ‎03-22-2012 02:35 PM by Retired (4,372 Views)

Summary

 

This article applies to BlackBerry® wireless devices based on Java™.

 


Description

 

The table below lists the maximum number of threads that can be created by a single application as well as the maximum number of threads that can exist system wide.  If an application has reached its thread limit, attempting to start another thread will fail and a TooManyThreadsError exception will be thrown. Similarly, if the BlackBerry Smartphone has reached its total thread limit and an application attempts to create another thread, a TooManyThreadsError exception is thrown.

 

BlackBerry Device Software Version Maximum number of threads per application Total maximum number of threads for all applications
4.5.0 and lower 16 128
4.6.0 to 4.7.0 64 No fixed limit
5.0.0 and higher No fixed limit

No fixed limit

 

Please note that it is still possible to generate a TooManyThreadsError exception even when there is no fixed limit. If the device does not have the available resources to allocate another Thread, then this error can be thrown. No fixed limit simply means that there is no hard-set number at which additional Thread creation will be refused.