Skip to content

Ensure threads aren't forked in withTransaction #7

@brandonchinn178

Description

@brandonchinn178

SqlBackend is not thread safe, so one should not use the same SqlBackend in multiple threads (ref). This means that the following program will have problems:

withTransaction $ do
  -- forkIO from UnliftIO.Concurrent
  forkIO $ insert $ ...
  insert $ ...

Make sure this can't happen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions