| 07-15-2008, 08:17 PM | #1 |
Is Warcraft 3 capable of starting new threads? If so please tell me how and what you mean by multi threading or should I say a new thread. |
| 07-15-2008, 09:03 PM | #2 |
ExecuteFunc nd TriggerExecute start a new thread. |
| 07-15-2008, 09:14 PM | #3 |
It cannot multithread in the sense that is normally used. When we talk of threads, it's a different sort of thread to that. |
| 07-16-2008, 02:51 AM | #4 |
no user threads supported, this is just game. |
| 07-17-2008, 07:22 AM | #5 |
WC3 emulates all code. Actually its not really multithreading. All the time WC3 has a list of currently executing "threads", with their stack, "instruction pointer" etc (can't be sure how exactly it works), and in every update frame every thread is executed until it either finishes or crashes (hits op limit or does something like divide by 0) or uses triggersleepaction/any other wait function. Every trigger instance is run in a separate "thread". Also ExecuteFunc runs the specified function in a new "thread". So it is almost a thread, the main difference (apart from the whole thing being emulated) is that normally a thread would give way when it does a certain amount of operations, but here a thread only gives way if the programmer tells it to. |
