This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: thread unique id wrapping around
- From: Laurie Gellatly <laurie dot gellatly at netic dot com>
- To: Quanren Xiong <xiongqr at gmail dot com>
- Cc: eCos Discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 28 Mar 2012 07:26:02 +1100
- Subject: Re: [ECOS] thread unique id wrapping around
- References: <CAF3R6RuqcrfkGWYtH3o7cWNsnni4-FPFSCUmG3gfF_4OO_aTLw@mail.gmail.com>
Hi,
We've taken a completely different approach. We only create threads at startup and then have them checkin to the watchdog. Resource usage is more deterministic (when compared to dynamically creating threads) and there is less work required on each new web request. We don't need a thread monitor or know or care about the thread id.
...Laurie:{)
On 28/03/2012, at 12:12 AM, Quanren Xiong <xiongqr@gmail.com> wrote:
> Hi,
>
> We are running a web server on our ECOS plaform. It spawns a thread
> each time a web request comes in.
> We found that afte a while the thread unique id would wrap around.
> An id that is being used by a running thread would be re-used.
> Our thread monitor which keeps track of running thread by their ids
> would assert because it sees duplicate ids.
>
> Anyone have any suggestions or solutions. Thank you very much.
>
>
> Regards,
>
> Q Xiong
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss