First of all, predicates
not(X) :- X,!,fail. not(X).
repeat. repeat :- repeat.
are predefined in Ciao (not/1 is called (+)/1 (it is a prefix operator)). The problem in your program is that a call to a concurrent data predicate that has not been closed blocks (rather than failing) when there are no (more) clauses, waiting for more clauses to be asserted by other threads. To avoid that, use current_fact_nb/1, for example in your program try
+ current_fact_nb(proceed(N,I)),
Daniel Cabeza