avoid infinite loop in sync when a mzc-generated function in an event generator for a struct, and it returns the struct itself

svn: r3262
This commit is contained in:
Matthew Flatt 2006-06-07 15:07:34 +00:00
parent 98a6df7010
commit fa179c9c7a

View File

@ -804,6 +804,8 @@ static int evt_struct_is_ready(Scheme_Object *o, Scheme_Schedule_Info *sinfo)
result = scheme_apply(f, 1, a); result = scheme_apply(f, 1, a);
if (scheme_is_evt(result)) { if (scheme_is_evt(result)) {
SCHEME_USE_FUEL(1); /* Needed beause an apply of a mzc-generated function
might not check for breaks. */
scheme_set_sync_target(sinfo, result, NULL, NULL, 0, 1); scheme_set_sync_target(sinfo, result, NULL, NULL, 0, 1);
return 0; return 0;
} }