Web Framework - Threads

Since pre-emptive threads arrived on the scene was wondering if there are plans for web Sessions and HandleURL to get their own threads ?

Been wondering for a while and don’t recall seeing anything about it.

I remember that Xojo staff mentioned it. Like they are thinking or testing this and see if they can do it. I bet they announce it once this becomes available.

Thanks @Christian_Schmitz

@Ricardo_Cruz any intel you can share ?

Thanks
Steve

Does this mean that we can modify the xojo source code, save, and refresh the page (like in PHP) without starting from the beginning?

Forgive my ignorance.

All requests are already being served on their own Cooperative Thread, to avoid one request to block another one, it’s been always working like that. This makes the server able to serve 8000~10000 requests per second already, with a single instance.

We are already testing to make some internal code to run in Preemptive Threads, like when the server is parsing the request headers before user code is being executed. Or when we write the output to the socket, after the user code has been executed. As soon as one of these pieces bring a significant performance boost, we will ship it.

What we won’t be able to do is just switching them to Preemptive, generally. For example, in a Pressed event, we can’t know if the user code handling that event will be thread safe or not. We will have to make improvements to allow the user to manually run portions of the code in Preemptive Threads.

No Dale, but I guess you can already do these things using XojoScript.

3 Likes