Originally Posted by
lare96
- Graham's runs on it's own thread so in order for it to be safe it has to be used to "process" the server
- Graham's is better designed
- Graham's lacks an "attachment" feature so you have to check if the player has disconnected in every task (attachment feature takes a minute to add...)
correct
this is fine, I think that cycle based tasks are best designed and make a lot more sense design-wise being processed by the engine rather than itself being the engine
correct
you don't need Graham's TaskScheduler to do that (and I don't think he'd want you to use it for that) use a cached thread pool for small asynchronous operations and use a ScheduledExecutorService if those operations need to be scheduled to execute sometime in the future (can't think of an instance where you'd need that, just use a cached thread pool)
this isn't gonna remove much, if any overhead, but you have two choices
- scrap Graham's TaskScheduler, use a raw ScheduledExecutorService (SES) to run your server and have it processing your CycleEvents
- scrap CycleEvents, remove the threading and synchronization logic from Graham's system and use a SES to process it