Bug #896

MapPyGroup birth and death

Added by Jackson, Mike over 12 years ago. Updated about 12 years ago.

Target version:
Start date:
07 February 2012
Due date:
% Done:


Estimated time:


A possible issue?

At present MapPyGroup.death does:

            for worker in self._workers:
                assert worker.death()
        except: # pylint:disable = W0702
            return False
        return True

This means that if death of one sub-worker fails, then death won't be called on subsequent workers? Is this an issue? Will it matter that the subsequent ones won't be @death@d and possibly do their clean-up?


Updated by Tunnell, Christopher over 12 years ago

For offline user-mode, it was just meant to crash and burn so people actually noticed that death failed. If death fails then something very wrong has happened...

For online running, we want to keep running so will want to 'death' as much as possible. We could just set an 'error' bit, do try-catch, if exception then error := 1 but continue 'death'ing workers. Then the function returns not(error)? Then go can choose what to do.

But I agree that complicated logic should be avoided in MapPyGroup: it should kill all it can, then notify how well it did.


Updated by Rogers, Chris over 12 years ago

  • Category changed from Online reconstruction to common_py
  • Assignee changed from Tunnell, Christopher to Rogers, Chris

I can do it if you want...


Updated by Rogers, Chris over 12 years ago

Also, in del I notice that it always deaths the workers. What if I have multiple instances? Should be that we death() only if this is the last reference (i.e. death works like a normal python destructor)


Updated by Rogers, Chris over 12 years ago

Forget that last comment, it's just wrong...


Updated by Rogers, Chris over 12 years ago

  • Target version set to Future MAUS release
  • Workflow changed from New Issue to Awaiting Merge

Fixed in Rogers and tests added for whole class (I even found some bugs)


Updated by Rogers, Chris over 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100
  • Workflow changed from Awaiting Merge to Closed

I also fixed birth so that if it fails, it deaths() all workers.


Updated by Rogers, Chris about 12 years ago

  • Target version changed from Future MAUS release to MAUS-v0.1.4

Also available in: Atom PDF