You must get rid of the infinite loop!!
Scheduled tasks don't need the while(true) block, which by the way forces the thread from the thread pool to never return
That explains why you have those problems...
Please make sure to check out the example in the documentation, here:
http://docs2x.smartfoxserver.com/Gettin ... wtos#item7
Thread question
- gabrielvpy
- Posts: 69
- Joined: 23 Jul 2015, 20:18
Re: Thread question
OK. I thought I could have the thread run an infinite loop and just cancel it when something happens. Thanks, lapo.
We made an awesome GPS - MOBA.
Try it out here: Get Fhacktions
Try it out here: Get Fhacktions
Re: Thread question
Yeah ... bad idea ... this way you're blocking all threads in the thread pool. Definitely remove it and it will work as expected.
Also make sure to add the try/catch block as explained in the docs, otherwise a runtime exception could stop the task.
cheers
Also make sure to add the try/catch block as explained in the docs, otherwise a runtime exception could stop the task.
cheers
Who is online
Users browsing this forum: No registered users and 125 guests