This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Address | |
def initialize address, display_name, domain | |
@address = address | |
@display_name = display_name | |
@domain = domain | |
end | |
attr_reader :address, :display_name, :domain | |
def self.from_header h # returns an Array of Addresses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | Simple in-process key/value cache | |
-- | |
-- Of course, for really simple stuff you could probably use unsafeInterleaveIO | |
module Cache (Cache, newCache, fromCache) where | |
import Control.Monad (void) | |
-- Could also use STM instead | |
import Control.Concurrent (forkIO, Chan, newChan, readChan, writeChan, MVar, newEmptyMVar, putMVar, takeMVar) |