From 1dbb0c214d39eb63d4c11aa0350f6e3d748be285 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Wed, 6 Aug 2008 19:08:15 +0000 Subject: [PATCH] bug fix --- Robust/src/ClassLibrary/Barrier.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Robust/src/ClassLibrary/Barrier.java b/Robust/src/ClassLibrary/Barrier.java index 66404cbd..3f549f04 100644 --- a/Robust/src/ClassLibrary/Barrier.java +++ b/Robust/src/ClassLibrary/Barrier.java @@ -1,16 +1,19 @@ public class BarrierServer extends Thread { int numthreads; - + int done; + public BarrierServer(int n) { numthreads=n; + done=0; } public void run() { int n; + ServerSocket ss=new ServerSocket(2000); atomic { n=numthreads; + done=1; } - ServerSocket ss=new ServerSocket(2000); Socket ar[]=new Socket[n]; for(int i=0;i