Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit dc5c648d authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Changed Thread handling and corrected print of parameters in ruleset stylesheet

parent 3372c331
/**
* $Id: TMerger.java,v 1.1 2002-11-06 14:08:21 serge Exp $
* $Id: TMerger.java,v 1.2 2002-11-26 16:34:57 triolet Exp $
*
* Transmorpher
*
......@@ -69,6 +69,7 @@ public abstract class TMerger extends TProcessBasic {
}
// The first current handler is the first one
handlerList[iCurrentHandler].setCurrent(true);
setFinished(false);
}
/**
......@@ -127,7 +128,9 @@ public abstract class TMerger extends TProcessBasic {
handlerList[iCurrentHandler++].setCurrent(false);
handlerList[iCurrentHandler].flushBuffer();
handlerList[iCurrentHandler].setCurrent(true);
}//end while
}
setFinished(true);
//end while
/*
*handlerList[iCurrentHandler++].setCurrent(false);
*if (iCurrentHandler < iNbIn) {
......
/**
* $Id: TProcessBasic.java,v 1.2 2002-11-13 15:43:41 triolet Exp $
* $Id: TProcessBasic.java,v 1.3 2002-11-26 16:34:57 triolet Exp $
*
* Transmorpher
*
......@@ -47,8 +47,11 @@ public abstract class TProcessBasic extends TProcess_Impl implements Runnable{
protected Thread procThread = null ;
protected boolean isThread = false ;
protected boolean isThread = false ;
protected boolean finished = true ;
/**
* Description of the Field
*/
......@@ -93,13 +96,28 @@ public abstract class TProcessBasic extends TProcess_Impl implements Runnable{
}
}
}
public boolean getFinished(){
return finished;
}
public void run(){
try{
System.out.flush();
while(!(getFinished())){
Thread.sleep(10);
}
}
catch (Exception e){}
}
public void setFinished(boolean finished){
this.finished=finished;
}
public void setThread(boolean useThread) {
isThread = useThread;
if (procThread == null) {
if ((procThread == null)&&isThread) {
procThread = new Thread(this);
}
}
......
/**
* $Id: Ruleset.java,v 1.2 2002-11-07 08:13:26 triolet Exp $
* $Id: Ruleset.java,v 1.3 2002-11-26 16:34:57 triolet Exp $
*
* Transmorpher
*
......@@ -111,7 +111,7 @@ public class Ruleset extends TransformationImpl implements Namespaced {
file.writeln(" ************************************************************ -->");
for( Enumeration e = parameters.getNames() ; e.hasMoreElements(); ){
String key = (String)e.nextElement();
file.writeln(2,"<xsl:param "+key+">"+parameters.getParameter(key)+"</xsl:param>");
file.writeln(2,"<xsl:param name=\""+key+"\">"+parameters.getParameter(key)+"</xsl:param>");
}
file.writeln("");
file.writeln(" <!-- Copying the root and its attributes -->");
......
/**
* $Id: Broadcast.java,v 1.2 2002-11-25 16:09:11 triolet Exp $
* $Id: Broadcast.java,v 1.3 2002-11-26 16:34:57 triolet Exp $
*
* Transmorpher
*
......@@ -52,6 +52,7 @@ public final class Broadcast extends TDispatcher {
/** the constructor */
public Broadcast(String[] pIn, String[] pOut,Parameters pParam){
super(pIn,pOut,pParam);
finished=false;
}
/** the start element method of content handler interface */
......@@ -84,6 +85,8 @@ public final class Broadcast extends TDispatcher {
/** the endDocument method of content handler interface */
public final void endDocument() throws SAXException {
setFinished(true);
for (int i=0; i<iNbOut; i++) {
contentHandlers[i].endDocument();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment