[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

#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

#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