u/kosmikusin r/haskell • Recommends
The Haskell Unfolder Episode 36: concurrency and the FFI
3.4K subscribers • 13 videos on Hallway
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!What people say. Recommended for its clear explanation of Haskell's FFI behavior under concurrent workloads.
u/kosmikusin r/haskell • Recommends
Hecateon Lobsters • Recommends