Skip to content

Use Foreign.Concurrent.newForeignPtr where applicable #146

New issue

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

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

Already on GitHub? Sign in to your account

Merged

Conversation

lukasz-golebiewski
Copy link
Contributor

@lukasz-golebiewski lukasz-golebiewski commented May 20, 2020

This is done in order to get rid of following problem:

error: a C finalizer called back into Haskell.
This was previously allowed, but is disallowed in GHC 6.10.2 and later.
To create finalizers that may call back into Haskell, use
Foreign.Concurrent.newForeignPtr instead of Foreign.newForeignPtr.

Co-authored-by: Paweł Szulc [email protected]

Fixes: #71

This is done in order to get rid of following problem:

error: a C finalizer called back into Haskell.
   This was previously allowed, but is disallowed in GHC 6.10.2 and later.
   To create finalizers that may call back into Haskell, use
   Foreign.Concurrent.newForeignPtr instead of Foreign.newForeignPtr.

Co-authored-by: Paweł Szulc <[email protected]>
@lukasz-golebiewski
Copy link
Contributor Author

@AlexeyRaga PTAL :-)

@AlexeyRaga AlexeyRaga merged commit bd48858 into haskell-works:master May 21, 2020
@AlexeyRaga
Copy link
Member

@lukasz-golebiewski Thanks a lot!
It was indeed an annoying issue :)

@lukasz-golebiewski lukasz-golebiewski deleted the use-foreign-concurrent branch April 28, 2021 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Foreign.Concurrent for finalizers and profiling issue
2 participants