[GHC] #9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar -------------------------------------+------------------------------------- Reporter: basvandijk | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: libraries (other) | Version: 7.8.2 Keywords: stm | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- I just needed a Weak pointer to a TMVar: {{{ -- | Make a 'Weak' pointer to a 'TMVar', using the second argument as -- a finalizer to run when 'TMVar' is garbage-collected. mkWeakTMVar :: TMVar a -> IO () -> IO (Weak (TMVar a)) mkWeakTMVar tmv@(TMVar (TVar t#)) f = IO $ \s -> case mkWeak# t# tmv f s of (# s1, w #) -> (# s1, Weak w #) }}} It might make sense to add a similar function for TSem as well. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar --------------------------------------+------------------------------------ Reporter: basvandijk | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: libraries (other) | Version: 7.8.2 Resolution: | Keywords: stm Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Comment (by Austin Seipp <austin@…>): In [changeset:"b0316cdb10fbd9eaca7ede28c7bb3eb19f7766bf/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="b0316cdb10fbd9eaca7ede28c7bb3eb19f7766bf" reading/writing blocking FDs over FD_SETSIZE is broken (Partially Trac #9169) Summary: libraries/base/cbits/inputReady.c had no limits on file descriptors. Add a limit as non-threaded RTS does. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: none Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D28 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar --------------------------------------+------------------------------------ Reporter: basvandijk | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: libraries (other) | Version: 7.8.2 Resolution: | Keywords: stm Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: new => patch Comment: Sorry, this commit had the wrong trac number, it seems! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar --------------------------------------+------------------------------------ Reporter: basvandijk | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries (other) | Version: 7.8.2 Resolution: | Keywords: stm Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Changes (by thoughtpolice): * milestone: => 7.10.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar -------------------------------------+------------------------------------- Reporter: basvandijk | Owner: Type: feature | Status: upstream request | Milestone: 7.10.1 Priority: normal | Version: 7.8.2 Component: libraries | Keywords: stm (other) | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => upstream -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar -------------------------------------+------------------------------------- Reporter: basvandijk | Owner: thoughtpolice Type: feature | Status: upstream request | Milestone: 7.10.1 Priority: normal | Version: 7.8.2 Component: Core | Keywords: stm Libraries | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonmar): * cc: core-libraries-committee@… (added) * owner: => thoughtpolice Comment: Patch looks fine. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar -------------------------------------+------------------------------------- Reporter: basvandijk | Owner: thoughtpolice Type: feature | Status: upstream request | Milestone: 7.10.1 Priority: normal | Version: 7.8.2 Component: Core | Keywords: stm Libraries | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by Austin Seipp <austin@…>): In [changeset:"8afdf274194e77e85e6a08dc4963022c56fc29d8/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="8afdf274194e77e85e6a08dc4963022c56fc29d8" stm: update submodule for #9169 addition Signed-off-by: Austin Seipp <austin@well-typed.com> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9169: Add mkWeakTMVar to Control.Concurrent.STM.TMVar -------------------------------------+------------------------------------- Reporter: basvandijk | Owner: thoughtpolice Type: feature | Status: closed request | Milestone: 7.10.1 Priority: normal | Version: 7.8.2 Component: Core | Keywords: stm Libraries | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: upstream => closed * resolution: => fixed Comment: Merged, thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9169#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC