You use the condition
attribute to specify the condition to use.
<cfset myVar=false>
<cfloop condition="myVar eq false">
<cfoutput>
myVar = <b>#myVar#</b> (still in loop)<br />
</cfoutput>
<cfif RandRange(1,10) eq 10>
<cfset myVar="true">
</cfif>
</cfloop>
<cfoutput>
myVar = <b>#myVar#</b> (loop has finished)
</cfoutput>