Skip to content

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
@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