one of the largest concerns with threading within mIRC is syncronization between threads. take a look at the following scenario.

Thread A calls alias Blah wich access a variable %blah. It performs lets say a loop based on the value of %blah. Before alis Blah has finished Thread B is givin a slice. It also calls an alias BlahB wich changes the value of %blah. Now execution returns to Thread A but %blah is now different thus affecting the way alias Blah from Thread A runs its loop. It could either exit it prematurely or get stuck in an infinite loop depending on how alias BlahB from Thread B alters %blah.

There are many many more concerns (what if thread B were to also call alias Blah. Im sure mIRC aliases are not reentrant safe).

Many people think that a thread can run at the same time as another thread, yet all of its code is executed prior to returning from the call that created it. This is not true creating a thread will return prior to the thread exiting (if it didnt then what would be the point of a thread?)

Im not against the idea at all, in fact id love to see more advanced topics such as these in mIRC. The problem is most scripters cannot understand alot of these topics and/or they are not easy to implement within the mIRC scripting model.

Besides theres literally thousands of other things that are easy to add and understand that we yet still dont have (ahem for,switch/case).

Have Fun smile


Have Fun smile