Branch: Tag:

2010-09-28

2010-09-28 16:06:35 by Martin Stjernholm <mast@lysator.liu.se>

Don't optimize away th_yield() calls in sleep(0).

Rev: src/builtin_functions.c:1.706
Rev: src/threads.c:1.283
Rev: src/threads.h:1.137

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.705 2010/07/28 22:51:00 mast Exp $ + || $Id: builtin_functions.c,v 1.706 2010/09/28 16:06:35 mast Exp $   */      #include "global.h"
4461:    if(delay == 0.0)    {    check_threads_etc(); +  /* Since check_threads doesn't yield on every call, we need this +  * to ensure th_yield gets called. */ +  pike_thread_yield();    return;    }