Currently I just discovered in SFSApi got expose this function
Code: Select all
TaskScheduler getNewScheduler(int threadPoolSize)I would like to ask some questions:
1. What is the difference between SFSApi.getNewSchedule(int poolSize), SFSApi.getSystemScheduler() and SmartFoxServer.getInstance().getTaskScheduler()?
2. When should I use them, in what cases?
3. And suppose my server have multiple room extension (ex: 1000 rooms) which is will be created when the users in and deleted when empty. Each room will handle different logic. What is the best practice for SFSApi.getNewSchedule(int poolSize), esp the poolSize number as I worry that the global Scheduler will not enough or too busy if all rooms point to use it?
ps: I got an ideal that if I just wanna do something concurrently and no need to wait for them I could use TaskScheduler with the delayTime=0 (ex: storing result scores to database) and the extThread will be release faster. is it a good practice?
Thankyou.