@Override
	public void run() {
		int writen = 0;
		while(writen < this.ByteToWrite )
		{
			try{
				r.acquire();
				synchronized(this){
				writer.writeDouble(data);
				writen += data.length * 8;
				data = null;
				w.release();
				}
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
		try {
			this.writer.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}