Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-25

Should check explicitly for None for greenlet parent

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.2
    • Affects Version/s: 0.1.2
    • Component/s: None
    • None

      In a few places where Motor asserts gr.parent is available should be done as:
      assert gr.parent is not None, ...

      This is because the greenlet class treats dead greenlets as false-like. This can be an issue when using existing greenlet code with motor as say:
      Grandparent->parent->child

      If the parent dies, the greenlet code in motor should just switch to the grandparent via the built in mechanism

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            nehz Zhen Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: