-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process multiple run requests #724
Comments
Hi @devaxolotl! |
Thank you for the reply @nikpachoo, here are more details on what I am trying:
docker run -d -p 8080:8080 --name kotlin-compiler-server [id of image]
POST http://localhost:8080/api/compiler/run
Content-Type: application/json
{
"args": "1 2 3",
"files": [
{
"name": "File.kt",
"text": "fun main() {\n Thread.sleep(5000L)\n\n println(\"5 seconds has passed\")\n}"
}
]
} In another client I set up this call: POST http://localhost:8080/api/compiler/run
Content-Type: application/json
{
"args": "1 2 3",
"files": [
{
"name": "File.kt",
"text": "fun main() {\n println(\"second call\")\n}"
}
]
}
I also tried it with a long running call instead of using sleep or timers. fun main() {
val n = 45
println("Fibonacci $n numbers:")
for (i in 0 until n) {
print(fibonacci(i).toString() + ", ")
}
}
fun fibonacci(n: Int): Int {
return if (n <= 1) {
n
} else {
fibonacci(n - 1) + fibonacci(n - 2)
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to set up kotlin-compiler-server but have run into something I don't know how to get past.
I am able to run the server but it looks like it will only process one request at a time. If I send a request that takes 10 seconds and then send another request the second request only starts after the first request completes.
Is this the expected behavior? Is it possible to get it to process multiple requests at the same time?
The text was updated successfully, but these errors were encountered: