Skip to content
GitLab
Menu
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
eb1116b3
Commit
eb1116b3
authored
Aug 26, 1999
by
simonmar
Browse files
[project @ 1999-08-26 13:34:36 by simonmar]
threadDelay etc. should be defined in PrelConc.
parent
327b1c6e
Changes
2
Show whitespace changes
Inline
Side-by-side
ghc/lib/std/PrelConc.lhs
View file @
eb1116b3
...
@@ -194,19 +194,9 @@ specified file descriptor is available for reading (just like select).
...
@@ -194,19 +194,9 @@ specified file descriptor is available for reading (just like select).
@threadWaitWrite@ is similar, but for writing on a file descriptor.
@threadWaitWrite@ is similar, but for writing on a file descriptor.
\begin{code}
\begin{code}
{- Not yet -- SDM
threadDelay, threadWaitRead, threadWaitWrite :: Int -> IO ()
threadDelay, threadWaitRead, threadWaitWrite :: Int -> IO ()
threadDelay (I# x#) = IO $ \ s# ->
threadDelay (I# ms) = IO $ \s -> case delay# ms s of s -> (# s, () #)
case delay# x# s# of
threadWaitRead (I# fd) = IO $ \s -> case waitRead# fd s of s -> (# s, () #)
s2# -> (# s2#, () #)
threadWaitWrite (I# fd) = IO $ \s -> case waitWrite# fd s of s -> (# s, () #)
threadWaitRead (I# x#) = IO $ \ s# ->
case waitRead# x# s# of
s2# -> (# s2#, () #)
threadWaitWrite (I# x#) = IO $ \ s# ->
case waitWrite# x# s# of
s2# -> (# s2#, () #)
-}
\end{code}
\end{code}
ghc/lib/std/PrelHandle.lhs
View file @
eb1116b3
...
@@ -1180,17 +1180,6 @@ mayBlock fo act = do
...
@@ -1180,17 +1180,6 @@ mayBlock fo act = do
CCALL(setNonBlockingIOFlag__) fo -- reset file object.
CCALL(setNonBlockingIOFlag__) fo -- reset file object.
CCALL(setConnNonBlockingIOFlag__) fo -- reset (connected) file object.
CCALL(setConnNonBlockingIOFlag__) fo -- reset (connected) file object.
return rc
return rc
-- #ifdef __HUGS__
threadDelay, threadWaitRead, threadWaitWrite :: Int -> IO ()
-- Hugs does actually have the primops needed to implement these
-- but the primops don't actually do anything...
threadDelay (I# ms) = IO $ \s -> case delay# ms s of s -> (# s, () #)
threadWaitRead (I# fd) = IO $ \s -> case waitRead# fd s of s -> (# s, () #)
threadWaitWrite (I# fd) = IO $ \s -> case waitWrite# fd s of s -> (# s, () #)
-- #endif
\end{code}
\end{code}
...
...
Write
Preview
Supports
Markdown
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