All Downloads are FREE. Search and download functionalities are using the official Maven repository.

godot.core.LongStringQueue.kt Maven / Gradle / Ivy

There is a newer version: 0.11.0-4.3
Show newest version
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