Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

I need a help understand the operations dependency in this scenario  #115

Description

@mohammdsss1

I need to maintain the value updates of one variable across my app, so let's assume I have this variable called number of type Int.

I created an operation called SerialOperation which responsible for incrementing number by one, the other operation called DataPrepOperation will wait (dependency on SerialOperation) for that operation to finish in order to use it. I also created PSBlockOperation that works as an adapter to ensure the transferring of that value between these two operations.

This design of operations was inspired by this post here.

My problem is that the operation called DataPrepOperation is always having the wrong value, for example: if I created three SerialOperation and another three DataPrepOperation then all DataPrepOperation will have the same last value. I don't understand what is the case here.

I attached the project for more.
AdapterOperation.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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