Re: Delete a list item from a separate thread safe?
- From: Ulrich Eckhardt <eckhardt@xxxxxxxxxxxxxx>
- Date: Wed, 05 Mar 2008 09:24:48 +0100
Bruce. wrote:
That's bad news for how I was planning to impliment this. Essentially the
items will be added to the list in one thread (a thread in a exe calling
my dll) and time stamped.
I need to periodically scan the list in another thread (lives in the dll)
and "age" the entries, deleting old entries past a certain expiration
time.
I'd suggest a strategy where you check out an entry (list::splice()!) in a
critical section and then manipulate it accordingly and check it back in in
another critical section. Alternatively, you could trigger aging the
entries after finishing your work on each entry, I guess it's not critical
that it is done in a guaranteed time (equivalent to soft realtime instead
of hard realtime).
Uli
.
- Follow-Ups:
- Re: Delete a list item from a separate thread safe?
- From: Bruce.
- Re: Delete a list item from a separate thread safe?
- References:
- Delete a list item from a separate thread safe?
- From: Bruce.
- Re: Delete a list item from a separate thread safe?
- From: Doug Harrison [MVP]
- Re: Delete a list item from a separate thread safe?
- From: Bruce.
- Delete a list item from a separate thread safe?
- Prev by Date: Re: Delete a list item from a separate thread safe?
- Next by Date: Re: Delete a list item from a separate thread safe?
- Previous by thread: Re: Delete a list item from a separate thread safe?
- Next by thread: Re: Delete a list item from a separate thread safe?
- Index(es):
Relevant Pages
|