Overview
Features
Download
Documentation
Community
Add-Ons & Services

Thread maximum number?

Please post support and help requests here.

Thread maximum number?

Postby Splitpi » 05 Oct 2009, 22:40

I'm using Poco 1.3.2-ssl

I have a multi-threaded application that runs on an embedded ARM processor that decodes and plays MPEG4 video files. The video processor portion of the application is its own thread that are created on an as needed basis. What I have found is that right around the 250'th creation of the Video Processor Thread, Poco throws an exception... every time.

I implemented this using ThreadPool and its now around 4000+ thread assign/use/release.

Is there limit on the number of times I can use Poco::Thread? I would prefer to use Poco::Thread rather than Poco::ThreadPool due to the ability of my VP class to know the state of its thread which is used for part of the control mechanism (with out joining the thread).

Anyone else noticed this kind of issue?
Splitpi
 
Posts: 3
Joined: 19 Dec 2008, 18:37

Re: Thread maximum number?

Postby alex » 05 Oct 2009, 23:46

Splitpi wrote:Is there limit on the number of times I can use Poco::Thread?


The limit is what the underlying system will bear. Keep in mind that every thread needs memory for its own stack, which is of fixed run-time size (in more recent releases configurable through compile-time macro POCO_THREAD_STACK_SIZE - provided your platform allows it). And then, there are performance issues associated with context switching - with thousands of threads this can bring you down quickly.

Anyway, what exception is thrown?
alex
 
Posts: 1143
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron