Personally i would write 1 thread that would manage the classes and call the methods. A timer would work too, but it would block your event loop while your thousands of classes are handled.
Math On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I am writing a class that needs to run a method at a given interval on its own. It is not critical that the timing be precise, and at runtime, there could conceivably be thousands of instances of this class in operation simultaneously. What is the best way to go about this? Make the class a subclass of a timer? Or perhaps a thread? It would be preferable if it would use as close to no processor power as possible.
_______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
