public void run() 
	{

		//this.wait_for_acces();
		
		for(int i=0;i<=this.actions_left;i++)
		{
			//System.out.println("ITERACJA! "+String.valueOf(i)+this.get_info());
		boolean access_granted = res.get_access(this);
		//res.get_vectors_info();
		if(access_granted && actions_left > 0)
		{
			this.use_action();
			this.get_acces_info();
			//res.get_vectors_info();
			res.wait_sec(2);
						
			if(pt == PersonType.WRITER)
			{
				res.write(this,"test");
				this.write_info("test");
			}
			else if(pt == PersonType.READER)
			{
				String msg = res.read();
				this.read_info(msg);
			}
			this.leave_acces_info();
			res.leave_access(this);
		}
		}
		//System.out.println("KONIEC!"+this.get_info());
	}