allocateHistoryIdent :: IO Integer
allocateHistoryIdent = do wc <- workerCache
                          (res:newIdents) <- readIORef $ wc_idents wc
                          writeIORef (wc_idents wc) newIdents
                          return res
allocateHistoryIdent :: IO Integer
allocateHistoryIdent = do wc <- workerCache
                          (res:newIdents) <- readIORef $ wc_idents wc
                          writeIORef (wc_idents wc) newIdents
                          return res
allocateHistoryIdent = do wc <- workerCache
                          (res:newIdents) <- readIORef $ wc_idents wc
                          writeIORef (wc_idents wc) newIdents
                          return res