Oops,
It should stop stopping when stopped !
Yves

Yves Jaradin wrote:


Harmon Nine wrote:

(...)

Thread 1

Sobj = {New Search.object script(Space CostFunction …)}

LoopStopper = _
HasStopped = _

% loop

proc {GetSolutions}

if {IsFree LoopStopper} then
%(2)

{Sobj next(NextSolution)} % (1)

if NextSolution == stopped then

HasStopped = unit

skip % exit loop

else

Process NextSolution

{GetSolutions} % Next iteration

end

else
HasStopped = unit
end

end

end

Thread 2

proc {StopCalc}

LoopStopper = unit

{Sobj stop}

if {IsFree HasStopped} then {StopCalc} end

end

end

(...)



_________________________________________________________________________________ mozart-hackers mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-hackers



_________________________________________________________________________________
mozart-hackers mailing list                           
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-hackers

Reply via email to