Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
72e3be2a
Commit
72e3be2a
authored
Sep 05, 2006
by
Simon Marlow
Browse files
improve conc039 a little bit, and omit it for threaded1
parent
51346192
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/concurrent/should_run/all.T
View file @
72e3be2a
...
...
@@ -90,9 +90,9 @@ test('conc037', only_ways(['threaded1','threaded2']), compile_and_run, [''])
test
('
conc038
',
only_ways
(['
threaded1
','
threaded2
']),
compile_and_run
,
[''])
# Omit for GHCi, uses foreign export
# Omit for
SMP (
threaded
2)
, because in this case the main thread is allowed to
# Omit for
the
threaded
ways
, because in this case the main thread is allowed to
# complete, which causes the child thread to be interrupted.
test
('
conc039
',
omit_ways
(['
ghci
','
threaded2
']),
compile_and_run
,
[''])
test
('
conc039
',
omit_ways
(['
ghci
','
threaded1
','
threaded2
']),
compile_and_run
,
[''])
# Omit for GHCi, uses foreign export
test
('
conc040
',
compose
(
only_compiler_types
(['
ghc
']),
...
...
testsuite/tests/ghc-regress/concurrent/should_run/conc039.hs
View file @
72e3be2a
...
...
@@ -5,13 +5,16 @@ import System.Mem
import
Control.Concurrent
foreign
export
ccall
"performGC_"
performGC'
::
IO
()
performGC'
=
do
yield
;
performGC
performGC'
=
do
putMVar
m
()
;
yield
;
performGC
foreign
import
ccall
"performGC_"
f
::
IO
()
{-# NOINLINE m #-}
m
=
unsafePerformIO
newEmptyMVar
main
=
do
forkIO
f
yield
takeMVar
m
-- This tests for a bug in the garbage collector, whereby a main
-- thread that has completed may be GC'd before its return value is
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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