Skip to content
0:00 / 0:00

#ffi#c#ghc

The Haskell Unfolder Episode 36: concurrency and the FFI

Well-Typed

3.4K subscribers • 13 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.

Intermediate. Assumes working knowledge.

1.5K views1 year ago2 recommendations

Programming languagesSystems programmingHaskellConcurrency and parallelismPerformance and optimization

An explanation of safe versus unsafe foreign function imports in Haskell and how they interact with GHC's runtime and concurrency.

There are two primary ways to import C functions in Haskell: "unsafe" and "safe". We will first briefly recap what this means: `unsafe` functions are fast but cannot call back into Haskell, `safe` functions are much slower but can. As we will see in this episode, however, there are many more differences between `unsafe` and `safe` functions, especially in a concurrent setting. In particular, `safe` functions are not always safer!

Why it's here

2 people recommend this

What people say. Recommended for its clear explanation of Haskell's FFI behavior under concurrent workloads.

u/kosmikusin r/haskell • Recommends

The Haskell Unfolder Episode 36: concurrency and the FFI

Hecateon Lobsters • Recommends

The Haskell Unfolder Episode 36: concurrency and the FFI