ursus04/11/2020, 7:32 PM
Zach Klippenstein (he/him) [MOD]04/13/2020, 5:30 PM
from multiple threads just fine. However if you call your
update logic from multiple threads concurrently, there’s a race and your set could lose items. This can happen because both threads can read the relay’s value at the same time, each add their own `downloadJob`s, and then the first one to call
newJobs = …
will get overwritten by the second one.
), then it should be safe.
ursus04/13/2020, 6:33 PM
All methods except accept(T) are thread-safe. Use toSerialized() to make it thread-safe as well.
Zach Klippenstein (he/him) [MOD]04/13/2020, 11:02 PM
ursus04/13/2020, 11:32 PM