TD2: Comment thread-safety requirement.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 14 Mar 2018 16:29:30 +0000 (17:29 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 14 Mar 2018 16:29:30 +0000 (17:29 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TD2/server/BroadcastoThreadService.java

index e8a3622a2d53a7396a8877b22b6830dc7769b661..4c7281307fb3742d980cdeca342549f249511268 100644 (file)
@@ -38,6 +38,13 @@ public class BroadcastoThreadService implements Runnable {
                }
        }
 
+       /**
+        * Be careful, this function must be thread-safe
+        * @param  clientSocket           [description]
+        * @param  sharedList             [description]
+        * @throws IOException            [description]
+        * @throws ClassNotFoundException [description]
+        */
        public void doService(Socket clientSocket, ArrayList<ObjectOutputStream> sharedList) throws IOException, ClassNotFoundException {
                ObjectInputStream OReader = new ObjectInputStream(clientSocket.getInputStream());
                ObjectOutputStream OWriter = new ObjectOutputStream(clientSocket.getOutputStream());