Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Dependencies when destroying a context? #177

Open
@billwolckenlmco

Description

@billwolckenlmco

When a context is created, if component A depends on B, then B will be created before A. Is there a way to insure that when a context is destroyed that the dependent is destroyed before the dependency - i.e. A is destroyed before B?

The behavior I'm seeing is the components are destroyed in the same order that they are created, which means that dependencies are destroyed before the components that use them. Hence dependencies get ripped out from under the code that needs them.

My scenario is a component which writes status updates and a database component. The status updater depends on the database, so the database gets created (and connected) before the status updater gets created, so the database is ready before any status updates get written. But on destroy, the database gets destroyed (and the connection closed) before the status updater (since that's the order they were created), so the last status updates error out because the database has been torn down before the status updater has finished.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp