Thread scripts

Hi all,

I try to find answer on web, but I don’t.
With mAirlist v3, are the scripts executed in a different thread than the GUI one ?

Moreover, in mAirlist scripts, can the developer manage others thread instructions ?

If there is some documentation, just let me know ^^.

Thank you everybody.


Theo

I’m not certain, but I think they are. I’m sure Torben will be here shortly to say a definite ‘yes’ or ‘no.’

No.

Why do you ask? I wouldn’t want to mess around with threads from a mAirList script.

BFN
CAD

I ask because some instructions needs to be executed in “parallel”, not in “sequence”.

Of course, it’s no way to create numerous useless threads… But, if threads are “standard concept” for modern programming languages, it’s because there are useful for some kings of algorithms…like some mAirlist algorithms.

in v3, the scripts are executed in the thread from which they are invoked.

Script run from menu -> main thread

Script run via RUNSCRIPT -> command processing (background) thread

In any case, when you run two scripts (invoked in the same way), they will be executed sequentially.

And what about notification scripts ?

If, for example, I create some specific code when a player unloads ? Will the GUI interface be paused until the end of the notification scripts ?

Notification scripts run in their own thread. The GUI will not pause. All processing is asynchronous, and depending on the load of your system, there may be a delay between the actual event (e.g. player is started) and the invocation of the script.

Notification scripts run in their own thread.

Wonderful ! That’s why I was waiting for since mAirlist v2.