过多线程异常 [英] Too Many Threads Exception

查看:300
本文介绍了过多线程异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在BlackBerry开发面临的问题。在我的应用程序必须从服务器获取的图像,所以我必须为每一个形象我从server..but加载做关于控制线程,所以我得到TooManyThreadsException..Any思想独立的连接螺纹...

I am facing problem in blackberry development. In my application I have to get images from the server, so i have to create a separate connection thread for each image i load from the server..but in doing so i am getting TooManyThreadsException..Any ideas regarding controlling the threads...

在黑莓的应用程序可以有最多16个线程同时运行...但我在一次显示16个以上的图片...

In blackberry an application can have maximum of 16 threads running concurrently...but i have to display more than 16 images at a time...

推荐答案

重用线程,排队的所有图像,并运行只是一对夫妇的线程,每次打开一个处理一个图像,然后移动到下一个。

Reuse the threads, queue up all the images, and run just a couple of threads, each processing one image at a time and then moving on to the next.

有一个原因的单元只允许每个进程16,以及它与资源有关。你基本上凑合用较少的线程。

There is a reason the unit only allows 16 per process, and it has to do with resources. You basically have to make do with fewer threads.

这篇关于过多线程异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆