Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FSSDK-9918] add returnInMainThread flag for async init #470

Merged
merged 6 commits into from
Jan 11, 2024

Conversation

jaeopt
Copy link
Contributor

@jaeopt jaeopt commented Jan 5, 2024

Summary

This PR adds a flag (returnInMainThread) to async initialization for controlling to return on completion in main thread or background thread.

  • by default, returnInMainThread = true for backward compatibility.
  • set returnInMainThread = false to return in a background thread.

Test plan

  • add new unit tests covering returnInMainThread on and off
  • add new unit tests for backward compatibility (default returnInMainThread = true)

Issues

Copy link
Contributor

@muzahidul-opti muzahidul-opti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

void setOptimizelyStartListener(@Nullable OptimizelyStartListener optimizelyStartListener) {
setOptimizelyStartListener(optimizelyStartListener, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setOptimizelyStartListener(optimizelyStartListener, true);
boolean returnInMainThread = true;
setOptimizelyStartListener(optimizelyStartListener, returnInMainThread);

@jaeopt jaeopt merged commit 8bea0f1 into master Jan 11, 2024
11 of 12 checks passed
@jaeopt jaeopt deleted the jae/FSSDK-9918 branch January 11, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants