withExecutor :: ToExecutor a => a -> (Executor -> IO b) -> IO b
withExecutor e f = do
  executor <- createExecutor e
  result <- f executor
  destroyExecutor executor
  return result
withExecutor :: ToExecutor a => a -> (Executor -> IO b) -> IO b
withExecutor e f = do
  executor <- createExecutor e
  result <- f executor
  destroyExecutor executor
  return result
withExecutor e f = do
  executor <- createExecutor e
  result <- f executor
  destroyExecutor executor
  return result