WashNGo-2.12: WASH is a family of embedded domain specific languages (EDSL) for programming Web applications in Haskell.ContentsIndex
WASH.CGI.CGIHistory
Synopsis
historyTimeout :: Int
type StateID = (String, String)
history :: MVar (Map StateID TableEntry)
data TableEntry = TableEntry {
myID :: StateID
parentID :: (Maybe StateID)
nextparm :: PARAMETER
timeout :: Int
threads :: (MVar [MVar (CGIParameters, Handle)])
}
createEntry :: StateID -> Maybe StateID -> PARAMETER -> Maybe Int -> IO ()
readParameters :: StateID -> IO (CGIParameters, Handle)
notify :: StateID -> CGIParameters -> Handle -> IO Bool
Documentation
historyTimeout :: Int
standard value for timeout of interaction threads: one hundred seconds
type StateID = (String, String)
comprises the name of the application and a hash value.
history :: MVar (Map StateID TableEntry)
data TableEntry
Constructors
TableEntry
myID :: StateIDscript name and hash key
parentID :: (Maybe StateID)root has no parent
nextparm :: PARAMETER
timeout :: Inttimeout for this stage of interaction
threads :: (MVar [MVar (CGIParameters, Handle)])next round of parameters and output handle
createEntry :: StateID -> Maybe StateID -> PARAMETER -> Maybe Int -> IO ()
Takes the id of the current node, the id of the father node (if any), the current parameter, and (perhaps) a timeout value for the current interaction and enters a corresponding record into the history table.
readParameters :: StateID -> IO (CGIParameters, Handle)
Suspends the current thread by waiting on an entry with the current node's id. Returns the parameters passed to this node.
notify :: StateID -> CGIParameters -> Handle -> IO Bool
Attempts to pass parameters and a handle to a thread waiting for the given stateID. Returns True if successful and False if no such thread was found.
Produced by Haddock version 0.8