From: Jérôme Benoit Date: Wed, 14 Mar 2018 16:29:30 +0000 (+0100) Subject: TD2: Comment thread-safety requirement. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3d59b440efb79d37563fe45a6cb6a9b36c201158;p=TD_SR.git TD2: Comment thread-safety requirement. Signed-off-by: Jérôme Benoit --- diff --git a/TD2/server/BroadcastoThreadService.java b/TD2/server/BroadcastoThreadService.java index e8a3622..4c72813 100644 --- a/TD2/server/BroadcastoThreadService.java +++ b/TD2/server/BroadcastoThreadService.java @@ -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 sharedList) throws IOException, ClassNotFoundException { ObjectInputStream OReader = new ObjectInputStream(clientSocket.getInputStream()); ObjectOutputStream OWriter = new ObjectOutputStream(clientSocket.getOutputStream());