Changeset 13777


Ignore:
Timestamp:
Oct 17, 2019 12:49:55 PM (5 weeks ago)
Author:
molsson
Message:

#5843 Added comments to r13776.

Location:
branches/dev-jk-2483/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-jk-2483/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/ExternalFunctionExecutableGenerated.java

    r13776 r13777  
    1919        File file = new File(executable);
    2020        boolean success = file.delete();
     21        // The first attempt to delete may fail if the process has not terminated yet.
     22        // Possibly not necessary since LiveExternalFunction.destroyProcess() now calls ProcessCommunicator.teardown().
    2123        if (!success) {
    2224            try {
    23                 Thread.sleep(10);
     25                Thread.sleep(10); // Sleep some arbitrary duration to give the process time to die.
    2426            } catch (InterruptedException e) {
    2527                // Ignore
  • branches/dev-jk-2483/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/evaluation/LiveExternalFunction.java

    r13776 r13777  
    4646            compiler.log().debug("Finished evaluating live external function, time: " + time + "ms");
    4747        } catch (ProcessCommunicator.AbortConstantEvaluationException e) {
    48 
     48            // TODO What does this mean?
    4949        } catch (ConstantEvaluationException e) {
    5050            destroyProcess();
     
    9090            livingCachedExternals.remove(this);
    9191            try {
    92                 com.teardown(100);
     92                com.teardown(100); // TODO Should we check the return value?
    9393            } catch (IOException e) {
    94                 // Do nothing?
     94                // TODO Do we need to do anything here?
    9595            }
    96             com.destroy();
     96            com.destroy(); // TODO Do we still need to call destroy() if teardown is successful?
    9797            com = null;
    9898        }
Note: See TracChangeset for help on using the changeset viewer.