Async Control Flow

This page summarizes the projects mentioned and recommended in the original post on /r/haskell

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • pool-conduit

    Persistence interface for Haskell allowing multiple storage methods.

  • I don't think connection is returned to the pool here. The thread is interrupted when query is sent to server, but before the results are consumed. At that point cleanup action catches `ThreadKilled` exceptions and issues `ROLLBACK`, which fails with `libpg` exception because the previous operations was not completed. And now cleanup action rethrows the `libpg` exception instead of the `ThreadKilled` one - that's the behavior of `bracket` from `base`. [The fix](https://github.com/yesodweb/persistent/pull/1207/files#diff-f9d7f232cd00cb88188b7fcc68110e3f4cb378fcad9df652360de44d13cd86e3R199) was to use `bracket` from `unliftio`, which [rethrows the correct exception](https://hackage.haskell.org/package/unliftio-0.2.14/docs/src/UnliftIO.Exception.html#bracket).

  • exceptions

    mtl friendly exceptions

  • I see. Do you think rethrowing the original exception is the the right approach in all cases, or only in this case? In the documentation I wrote for the exceptions package, I recommend to let the release block's exceptions take priority, to match base's behavior. Should I recommend the opposite?

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • safe-exceptions

    Safe, consistent, and easy exception handling

  • In safe-exception and uniftio it was decided to rethrow the original exception exactly because they decided to use uninterruptibleMask, see here for details.

  • postgresql-simple

    Mid-level client library for accessing PostgreSQL from Haskell

  • Hmm, you are right, the bracket I pointed to is unrelated. I guess the fix is in catchAny, which doesn't catch ThreadKilled. So not it's not rolling the transaction back in case of asynchronous exceptions. My point is that it probably should not rollback even on synchronous exception. BTW the issue is well know, see for example here

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Azure PostgreSQL, Entra ID Authentication and .NET

    1 project | dev.to | 2 Jun 2024
  • PyPy has been working for me for several years now

    4 projects | news.ycombinator.com | 30 May 2024
  • The evolution of Serverless Postgres

    1 project | dev.to | 30 May 2024
  • Show HN: Serverless Postgres

    9 projects | news.ycombinator.com | 29 May 2024
  • Eradicating N+1s: The Two-Phase Data Load and Render Pattern in Go

    4 projects | news.ycombinator.com | 28 May 2024