jdmonin / JSettlers2

Java Settlers project home, downloads, and GPLv3 source code. To download the latest version as a JAR, see https://github.com/jdmonin/JSettlers2/releases/latest .
http://nand.net/jsettlers/
GNU General Public License v3.0
157 stars 63 forks source link

Propose chane in inbound message queue sync #25

Closed alesky78 closed 7 years ago

alesky78 commented 7 years ago

Hi Jeremy

this pull request is just to propose a solution for the sync of the InboundMessageQueue and open a discussion

you can see the commit https://github.com/jdmonin/JSettlers2/commit/e1d2c612601e52e0a312c57f12b1958554940f87

the idea is to manage the syncronization only in the two method and mantain the sync logic simpte to understand

in this mode the Treater remain in wait mode unitl a new message is inserted in the queue...

jdmonin commented 7 years ago

Let me think about this one. Although in general it's good to keep this kind of logic in one place, as-is this is very stable code which hasn't needed changes for years.

alesky78 commented 7 years ago

ok no problme...

the idea is also to remove the yeld() calls that is SO and JVM dependent i will opena ticket wiht this piece of code...

i want to delete this branch from my repo.....