www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9606] New: `std.signal` implementation is fundamentally incorrect

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9606

           Summary: `std.signal` implementation is fundamentally incorrect
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



15:02:34 MSK ---
`std.signal` implementation is written like it is called from a single thread
or explicitly synchronized. The reality is on objects collecting GC calls
dispose events of finalizing object from its thread. So `unhook` can be called
in a middle of `emit`, `connect`, or `disconnect` freezed in other thread.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 27 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9606




15:03:21 MSK ---
As we can't lock GC (at least in `emit`) some sort of lock-free programming
should be used here.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9606




17:03:54 MSK ---
A think-less fix just to prevent nasty random failures:
https://github.com/D-Programming-Language/phobos/pull/1179

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 27 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9606


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |4151



15:00:58 MSK ---
Added issue 4151 as a dependency as weak reference looks as the right way to
fix this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 16 2013