Multi-threading in Servoy

Hi,

I read that Servoy is only single threaded.

Does this mean I cannot spawn a separate thread which executes foundset queries? I’d like to do batch processing activities.

erikd:
I read that Servoy is only single threaded.

That’s correct.

erikd:
Does this mean I cannot spawn a separate thread which executes foundset queries? I’d like to do batch processing activities.

You can use the headless client plugin to do that.
This will be a separate headless session (& license!) which can execute the code for you and return results via a callback method.

Hope this helps

Ok, thanks for the advice.

Batch processing activities are best done using batch processors on the server, as it means that the data doesn’t have to be send back and forth between the client and the server.

Paul

Hey guys,

If I use the usual socket listener approach and create a new thread on connection from a client in a server-client scenario. If I’m acting on a found set can I not duplicate that found set for the purposes of that particular thread?

When you refer to single threading, does that mean a single thread per user on the server, or for the entire server?

Thank you,
Don

No the server can do things multithreaded, every client is single threaded, smart-client, or webclient or headlessclient can only do one thing at a time

To be more precise the only thing that is single-threading is the code that you create in Servoy. If methods and such where multi-threading then you would be in world of hurt because of race conditions. Things get a WHOLE lot more complicated if we would have to use semaphores and such to manage the threading issues.
Any Java code like plugins and such CAN still be multi-threading.

Thank you for the clarifications. - Don