Grigory Panko
03/28/2025, 9:34 AMio.ktor.util.collections.ConcurrentMap
and io.ktor.util.collections.ConcurrentSet
considered public API (in terms of can I safely use it in my network module which already has dependency on Ktor)? I see only comment Please do not use it.
on ConcurrentMap
(and no comment on ConcurrentSet
), but they both have public visibility and no InternalAPI
annotation.Aleksei Tirman [JB]
03/28/2025, 9:40 AMGrigory Panko
03/28/2025, 9:41 AMAleksei Tirman [JB]
03/28/2025, 10:00 AMConcurrentMap
is delegated to the ConcurrentHashMap
on the JVM platform. On the POSIX targets, each operation of the ConcurrentMap
is synchronized with a lock and the LinkedHashMap
is used as a delegate. The ConcurrentSet
uses the ConcurrentMap
under the hood.
I think it's safe to use these classes as long as the implementations fit your requirements.Grigory Panko
03/28/2025, 10:04 AM