Merge "Use synchronize instead of Assert.isMainThread" into sc-dev