Boost logo

Boost Users :

From: Manuel Jung (gzahl_at_[hidden])
Date: 2007-02-26 13:17:32


Hi,

Sorry for hte delay, but i was in a train again yesterday, with no
internet...
But here im back now.

> I don't really know :) I'm trying to gain more info on the
> context where the core happens. Let's begin with say the
> header and then we will pull from this thread if necessary,
> OK?

you got two files with this message. These are the slots.h and octopus.h.
They are the only ones with multi_index_container definitions. Tell me what
you need else. The files are just how they are, nothing is stripped out.

>> Ps.: I have some question about the mem_fun. You cannot have a
>> index which is automaticly recalculated within a member
>> function, can you? Im thinking about a function checking, if a
>> try_mutex is locked. But i think, this is against the natured
>> of a index. Am i right?
>
> I'm not getting your question. Could you please reformulate
> it using some pseudocode of your intended mode of usage? Thank
> you!

Ok i'll try:

Imagine some Function

bool slot::IsIdle()
{
boost::try_mutex::scoped_try_lock lm_idle(m_idle);
return lm_idle.locked();
}

The class "slot" models the idea of a slot which does some work in its own
thread. It automaticly locks a try_mutex if its doing something.

i have a multi_index_container with a couple of these "slot" objects. One of
the indexs should take the IsIdle function as key, so i can select just the
range of "slot" objects, which are idle and waiting for some work.

Im not writing the code for the function (because i dont know how i should
do..).
My question about this is: I should have to update the multi_index_container
(modify/replace) manual, when the IsIdle status changes, right? the
container wouldn't serve me with the actual (at the time of doing
some "range" query) result of the IsIdle function?

So far.
Manuel Jung

> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net