You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
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 need to maintain the value updates of one variable across my app, so let's assume I have this variable called
number
of typeInt
.I created an operation called
SerialOperation
which responsible for incrementingnumber
by one, the other operation calledDataPrepOperation
will wait (dependency onSerialOperation
) for that operation to finish in order to use it. I also createdPSBlockOperation
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 threeSerialOperation
and another threeDataPrepOperation
then allDataPrepOperation
will have the same last value. I don't understand what is the case here.I attached the project for more.
AdapterOperation.zip
The text was updated successfully, but these errors were encountered: