godot.core.LongStringQueue.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-debug Show documentation
Show all versions of godot-library-debug Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
package godot.core
import java.util.*
internal object LongStringQueue {
// If changed, remember to change also max_string_size in long_string_queue.cpp and the StringTest.kt
var stringMaxSize = 512
private val stringQueue = ThreadLocal.withInitial {
ArrayDeque(5)
}
fun queueString(str: String) {
stringQueue.get().addLast(str)
}
fun pollString(): String {
return stringQueue.get().pollFirst()
}
external fun sendStringToCPP(str: String)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy