pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2003-11-25
2003-11-25 22:15:35 by Martin Stjernholm <mast@lysator.liu.se>
1943a1462c3110bb9673e0a0ba828277577a0c80 (
13
lines) (+
12
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Test thread yielding in tight loops.
Rev: src/testsuite.in:1.694
1:
-
test_true([["$Id: testsuite.in,v 1.
693
2003/11/
15
17
:
36
:
04
mast Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
694
2003/11/
25
22
:
15
:
35
mast Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]])
4108:
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([[
+
// Test that a loop relinquishes the interpreter lock every now and then.
+
int count, stop;
+
Thread.thread_create (lambda() {while (!stop) count++;});
+
sleep (0.1);
+
stop = 1;
+
sleep (0.1);
+
return count > 0;
+
]], 1)
]]) cond([[all_constants()->thread_create]],