implementing the isMultiThreaded method in the jpl PrologEngine