public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] thread unique id wrapping around
@ 2012-03-27 13:12 Quanren Xiong
  2012-03-27 20:26 ` Laurie Gellatly
  0 siblings, 1 reply; 2+ messages in thread
From: Quanren Xiong @ 2012-03-27 13:12 UTC (permalink / raw)
  To: eCos Discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] thread unique id wrapping around
  2012-03-27 13:12 [ECOS] thread unique id wrapping around Quanren Xiong
@ 2012-03-27 20:26 ` Laurie Gellatly
  0 siblings, 0 replies; 2+ messages in thread
From: Laurie Gellatly @ 2012-03-27 20:26 UTC (permalink / raw)
  To: Quanren Xiong; +Cc: eCos Discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-27 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 13:12 [ECOS] thread unique id wrapping around Quanren Xiong
2012-03-27 20:26 ` Laurie Gellatly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).