Imma steal the jackpot idea. Huehuehue
Imma steal the jackpot idea. Huehuehue
You should only make as many threads as you have CPU cores...
https://msdn.microsoft.com/en-us/lib...51(VS.85).aspx
Yeah but that's why you'd use a ThreadPool (collection of reusable worker threads) instead of running 10K timers in the background which will certainly affect the execution time for the code in the main thread.
If the main thread gets stuck executing other code then your timer(s) will lag.
So that is why using a ThreadPool Thread for each Timer per Session would improve performance. This is what I mean by that.
Thread newThread -> The code that is being executed.
while true ->
check for cooking
check for taxi
check for others
<-
<- Thread is running.
User disconnects? Thread goes back into the thread pool after safely disposing.
Another suggestion would be creating a raw thread and separating the users individually using a "foreach" statement, then do exactly the same thing demonstrated above. (Which Butterfly already does in it's GameClient Cycle, so you can take advantage of that?)
Define 'stable'.
By my defenition it's a bulletproof loosely coupled architecture. If one piece breaks down the whole emulator doesn't go down with it. I don't see such an architecture here, this is just another uberEmulator based piece of garbage that has everything tightly coupled, if one thing breaks, everything breaks.
Too bad the JIT compiler / VM also uses several threads so this logic doesn't fully apply to managed languages such as C# and Java.
- - - Updated - - -
What you're saying is not fully true. What if your main thread hangs which the ThreadPool relies on? If you main thread hangs, you have an shitty system.
@Wotsuba No my friend, you don't understand what you're talking about... your methodology is completely wrong.
Last edited by TheEdit0r; 25-11-15 at 12:19 AM. Reason: Edited to avoid infraction.
Last edited by Taiga; 09-10-16 at 08:06 PM.
Looks amazing to see you share stuff with the community. I think people could steal some features from it or just maybe improve the server.
Great Job @Jonteh . I'm getting the last weeks in love with you for your recent releases and developments ;)
Keep the good work up :D
I've been sharing for years! I just stopped for a while due to the amount of trolls on here, though I figured why let that stop me.
I plan to keep releasing basically everything I code, because I won't always be here and I'd like to pass on knowledge to the next batch of developers the community gets.
I have some problem. Emu load perfect but when I enter the client, I keep reloading