publishSolutionAndTerminateResolutionIfNeed
suspend fun publishSolutionAndTerminateResolutionIfNeed(solution: Solution, resolutionScope: CoroutineScope): Boolean
Publishes solution onto solutionChannel -- unless it is already closed, in which case this is a no-op that returns false -- and, if solution is not a Solution.No and publishing it makes solutionCounter reach solveOptions' SolveOptions.limit (and SolveOptions.isLimited holds), terminates the whole resolution via terminateResolution.
Return
true if solution was actually sent, false if solutionChannel was already closed.