Hello!
i have build my own task scheduler for my game, what i need is some kind of algorithm that create a lot of object that send a task to it... anyone know one?
Hello!
i have build my own task scheduler for my game, what i need is some kind of algorithm that create a lot of object that send a task to it... anyone know one?
for (i = 0; i < some big number; ++i) { schedule task; }
However, since this answer is trivially simple, I doubt it's what you are looking for. Perhaps you should clarify what you mean.
well, i'm looking for some algorithm that send task randomly, for examplei instantiate 200 object that randomnly send a task evety random seconds etc.. it's like a stress test
8 hours ago, Sylon87 said:well, i'm looking for some algorithm that send task randomly, for examplei instantiate 200 object that randomnly send a task evety random seconds etc.. it's like a stress test
That still seems relatively straightforward. For example, you could create some objects (e.g. 200, as in your example) that wait a random time interval, schedule a task, wait a random time interval, schedule a task, and so on. In other words, exactly what you described in your post above.
If that doesn't cover it, then as Nypyren suggested maybe you could clarify what it is exactly that you're not sure how to do.