createScope

expect fun createScope(): CoroutineScope

Creates a fresh, platform-specific CoroutineScope to run one :solve-concurrent resolution in -- one call per ConcurrentSolver.solveConcurrently invocation, so that cancelling the scope (e.g. once it.unibo.tuprolog.solve.SolveOptions.limit is hit, see ConcurrentResolutionHandle.terminateResolution) only affects the coroutines spawned for that particular resolution.

On the JVM this is backed by a dedicated cached thread pool, so branches of the search tree can genuinely run on separate OS threads. On Kotlin/JS this is currently unimplemented (TODO, throws NotImplementedError), meaning :solve-concurrent cannot presently be used from JS -- there simply is no JS actual scope to launch resolution coroutines onto.

Throws

on the current Kotlin/JS target.

actual fun createScope(): CoroutineScope

Creates a fresh, platform-specific CoroutineScope to run one :solve-concurrent resolution in -- one call per ConcurrentSolver.solveConcurrently invocation, so that cancelling the scope (e.g. once it.unibo.tuprolog.solve.SolveOptions.limit is hit, see ConcurrentResolutionHandle.terminateResolution) only affects the coroutines spawned for that particular resolution.

On the JVM this is backed by a dedicated cached thread pool, so branches of the search tree can genuinely run on separate OS threads. On Kotlin/JS this is currently unimplemented (TODO, throws NotImplementedError), meaning :solve-concurrent cannot presently be used from JS -- there simply is no JS actual scope to launch resolution coroutines onto.

Throws

on the current Kotlin/JS target.

actual fun createScope(): CoroutineScope

Creates a fresh, platform-specific CoroutineScope to run one :solve-concurrent resolution in -- one call per ConcurrentSolver.solveConcurrently invocation, so that cancelling the scope (e.g. once it.unibo.tuprolog.solve.SolveOptions.limit is hit, see ConcurrentResolutionHandle.terminateResolution) only affects the coroutines spawned for that particular resolution.

On the JVM this is backed by a dedicated cached thread pool, so branches of the search tree can genuinely run on separate OS threads. On Kotlin/JS this is currently unimplemented (TODO, throws NotImplementedError), meaning :solve-concurrent cannot presently be used from JS -- there simply is no JS actual scope to launch resolution coroutines onto.

Throws

on the current Kotlin/JS target.