Skip to content
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

std.signal implementation is fundamentally incorrect #9956

Open
dlangBugzillaToGithub opened this issue Feb 27, 2013 · 3 comments
Open

std.signal implementation is fundamentally incorrect #9956

dlangBugzillaToGithub opened this issue Feb 27, 2013 · 3 comments

Comments

@dlangBugzillaToGithub
Copy link

verylonglogin.reg (@denis-sh) reported this on 2013-02-27T04:02:34Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=9606

CC List

  • Bastiaan

Description

`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.
@dlangBugzillaToGithub
Copy link
Author

verylonglogin.reg commented on 2013-02-27T04:03:21Z

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

@dlangBugzillaToGithub
Copy link
Author

verylonglogin.reg commented on 2013-02-27T06:03:54Z

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

@dlangBugzillaToGithub
Copy link
Author

verylonglogin.reg commented on 2013-03-16T05:00:58Z

Added issue 4151 as a dependency as weak reference looks as the right way to fix this.

@LightBender LightBender removed the P2 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants