threadSafeListOf

fun <T> threadSafeListOf(vararg items: T): MutableList<T>

Safe to add and remove how you want If you want to iterate over the list then you need to do: synchronized(allProviders) { code here }