pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:5008:
},o); int tmp=0; while(o->read() != -1) tmp++; return tmp; ]],10000) dnl this will crash pike on out-of-address-space-related errors dnl test_any([[ catch { allocate(10000,thread_create)(lambda() { sleep(1); })->wait(); } ]])
-
test_any
([[
+
cond
([[
0]],
+
[[
// Test that a loop relinquishes the interpreter lock every now and then.
-
+
// This test is disabled since the yielding is known to not be good
+
// enough on multi-cpu machines. :(
+
test_any([[
int count, stop, fail; Thread.thread_create (lambda() { int stop_time = time() + 1; while (!stop) { count++; if (time() > stop_time) { fail = 1; break; } } }); sleep (0.1); stop = 1; sleep (0.1); return fail ? -1 : count > 0; ]], 1)
-
+
]])
// _disable_threads test_any([[ #ifndef __NT__ // Using a named pipe here to make open() block. That doesn't exist on NT. object t = class { void log (function f, string msg) { #if 0