goodnews...@gmail.com
unread,Apr 23, 2018, 6:06:41 PM4/23/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Netty discussions
Hello,
I've been coding a Netty server for over a year.
My games communicate and play well with it.
I ran into one problem:
I have the standard workergroup, bossgroup thing that spawns threads for every connection.
I also have another thread that is a loop that gives players rewards based on time, and logs timed out players off.
Without locks, the main loop throws exceptions with variables when two threads try and access at the same time.
Is there any general philosophy I should use than having global locks for the specific variables being accessed, and making the locks as simple as possible?
,Jim