mkScheduler :: ThreadManager -> IO Scheduler
mkScheduler tm = do
  lock <- newMVar ()
  tasks <- newMVar $ Map.empty
  waitTId <- newMVar Nothing
  counter <- newMVar 0
  
  return $! Scheduler { manager = tm,
                        lock    = lock, 
                        tasks   = tasks,
                        waitTId = waitTId,
                        counter = counter }
mkScheduler :: ThreadManager -> IO Scheduler
mkScheduler tm = do
  lock <- newMVar ()
  tasks <- newMVar $ Map.empty
  waitTId <- newMVar Nothing
  counter <- newMVar 0
  
  return $! Scheduler { manager = tm,
                        lock    = lock, 
                        tasks   = tasks,
                        waitTId = waitTId,
                        counter = counter }
mkScheduler tm = do
  lock <- newMVar ()
  tasks <- newMVar $ Map.empty
  waitTId <- newMVar Nothing
  counter <- newMVar 0
  
  return $! Scheduler { manager = tm,
                        lock    = lock, 
                        tasks   = tasks,
                        waitTId = waitTId,
                        counter = counter }