Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d0d2945b
Commit
d0d2945b
authored
Jan 05, 2007
by
Simon Marlow
Browse files
tests for
#1047
parent
8a741098
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/concurrent/should_run/all.T
View file @
d0d2945b
...
...
@@ -147,3 +147,6 @@ test('conc062', normal, compile_and_run, ['-package stm'])
test
('
conc063
',
exit_code
(
1
),
compile_and_run
,
['
-package stm
'])
test
('
conc064
',
normal
,
compile_and_run
,
[''])
test
('
conc065
',
ignore_output
,
compile_and_run
,
[''])
test
('
conc066
',
ignore_output
,
compile_and_run
,
[''])
testsuite/tests/ghc-regress/concurrent/should_run/conc065.hs
0 → 100644
View file @
d0d2945b
-- Test for bug #1047
import
Control.Concurrent
import
Control.Exception
-- This loop spends most of its time printing stuff, and very occasionally
-- pops outside 'block'. This test ensures that an thread trying to
-- throwTo this thread will eventually succeed.
loop
=
block
(
print
"alive"
)
>>
loop
main
=
do
tid
<-
forkIO
loop
threadDelay
1
killThread
tid
testsuite/tests/ghc-regress/concurrent/should_run/conc066.hs
0 → 100644
View file @
d0d2945b
-- Test for bug #1047
import
Control.Concurrent
import
Control.Exception
-- This loop spends most of its time printing stuff, and very occasionally
-- executes 'unblock (return ())'. This test ensures that a thread waiting
-- to throwTo this thread is not blocked indefinitely.
loop
=
do
unblock
(
return
()
);
print
"alive"
;
loop
main
=
do
tid
<-
forkIO
(
block
loop
)
yield
killThread
tid
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment