Skip to content

Commit

Permalink
Kotlin: Dispatch experiment API on the task queue
Browse files Browse the repository at this point in the history
Extending 9d3a300 to also apply to the experiment API as that's
(obviously) called by Nimbus early as well.
  • Loading branch information
badboy committed Jan 16, 2025
1 parent 3df4f34 commit ed4edbf
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,10 @@ open class GleanInternalAPI internal constructor() {
branch: String,
extra: Map<String, String>? = null,
) {
var map = extra ?: mapOf()
gleanSetExperimentActive(experimentId, branch, map)
Dispatchers.Delayed.launch {
var map = extra ?: mapOf()
gleanSetExperimentActive(experimentId, branch, map)
}
}

/**
Expand All @@ -355,7 +357,9 @@ open class GleanInternalAPI internal constructor() {
* @param experimentId The id of the experiment to deactivate.
*/
fun setExperimentInactive(experimentId: String) {
gleanSetExperimentInactive(experimentId)
Dispatchers.Delayed.launch {
gleanSetExperimentInactive(experimentId)
}
}

/**
Expand Down

0 comments on commit ed4edbf

Please sign in to comment.