| 09-23-2010, 11:30 PM | #1 |
I have a question about Timers. When does a timers call back function get called in respect to other currently executing functions. Lets say I have a LinkedList and I want to add a new item to it, but my timer has elapsed and is iterating through that list already. Are timers and their call backs being handled in a seperate thread? If they aren't then this wouldn't be a problem. If so I'd have to add some sort of lock on the linked list to insure the integrity of its data. I looked around and couldn't find any info so some help would be appreciated. |
| 09-24-2010, 03:14 AM | #2 |
one thread at time. if you already iterating list, no function will execute before you finished. metadata for every list will solve problem. |
| 09-24-2010, 03:41 AM | #3 |
Not sure what you mean by metadata for the list but thanks. Is there any case i need to worry about multi threaded programming because i recall reading somewhere about a thread per player or some such. |
| 09-24-2010, 04:27 AM | #4 |
Nope, wc3 doesn't have any multi-threading. |
| 09-24-2010, 04:27 AM | #5 |
Awesome thanks. Glad to hear that heh. |
