bug-gnu-chess
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnuchess-5.07 threading problem


From: Krister Walfridsson
Subject: gnuchess-5.07 threading problem
Date: Wed, 10 Mar 2004 00:49:31 +0100 (MET)

Hi,

I tried to use gnuchess-5.07 on a platform that does not have native
threads, but that use the non-preemptive PTH library instead.

It nearly works, but the input thread does not run while chess ponder().

This can be solved with an explicit sched_yield() as in the patch below,
although you might want to find a better place to place that call, in
order to give a more responsive user interface...

   /Krister



--- src/iterate.c.orig  Tue Mar  9 23:14:23 2004
+++ src/iterate.c       Tue Mar  9 23:14:54 2004
@@ -192,6 +192,7 @@
    }
    while (!(flags & TIMEOUT))
    {
+      sched_yield();
       if (score > MATE-255)
       {
         RootAlpha = score-1;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]