Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Is the order of Subject to events in the same frame guaranteed? #532

Open
KazukiKuriyama opened this issue Jun 23, 2023 · 0 comments
Open

Comments

@KazukiKuriyama
Copy link

KazukiKuriyama commented Jun 23, 2023

For example, if the following code is written to Value in the same script in the same frame, the events will be executed in the same order.
However, if written from another class as public from another script, the order does not seem to be guaranteed.

public readonly IntReactiveProperty reactiveProperty = new();
reactiveProperty
                .Subscribe(value => Debug.Log(value + " ")); 

            reactiveProperty.Value = 1;
            reactiveProperty.Value = 2;
            reactiveProperty.Value = 3;
@KazukiKuriyama KazukiKuriyama changed the title Is the order of Subscribe to events in the same frame guaranteed? Is the order of Subject to events in the same frame guaranteed? Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant