Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Is it safe to use 'unsafeDupablePerformIO' for decoding/encoding? #163

Open
hasufell opened this issue Jul 16, 2022 · 0 comments
Open

Is it safe to use 'unsafeDupablePerformIO' for decoding/encoding? #163

hasufell opened this issue Jul 16, 2022 · 0 comments

Comments

@hasufell
Copy link
Member

In GitLab by @maerwald on Jul 17, 2022, 04:47

It is said that unsafePerformIO is single-threaded, but unsafeDupablePerformIO can break bracket-like functions. Yet, bytestring uses it with unsafeWithForeignPtr.

Similar discussion here haskell/unix#157 (comment)

Use sites: https://gitlab.haskell.org/haskell/filepath/-/blob/c7d80e16e71bc1c85f4cd6158a96f2be6de64a1c/System/OsString/Common.hs#L113-124

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant