Skip to content

NRE #505

Description

@vasily-kirichenko

image

Activity

  1. forki commented on Jan 2, 2015

    @forki
    Member

    Mhm could still be everywhere.
    We could be brutal and open debugger?
    On Jan 2, 2015 4:23 PM, "Vasily Kirichenko" notifications@github.com
    wrote:

    [image: image]
    https://cloud.githubusercontent.com/assets/873919/5597033/7b5ad624-92ac-11e4-9ae2-105348f0ec76.png

    —
    Reply to this email directly or view it on GitHub
    #505.

  2. forki commented on Jan 2, 2015

    @forki
    Member

    Do you want me to pu Debugger.Break into this line: https://github.com/fsprojects/Paket/blob/master/src/Paket/Program.fs#L213 ?

  3. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    Wait a minute, I'll try to reproduce it under debugger. Seem to appear after paket version updated.

  4. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    Cannot catch it :( Yes, add Debugger.Break please.

  5. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    image

  6. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    image

  7. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    Cannot understand what here is null tho :(

  8. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    image

  9. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    Maybe it's caused by concurrent access to pathPenalties dictionary (if it's concurrent)?

  10. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    It seems that 4 threads are invoking this code:

    image

  11. forki commented on Jan 2, 2015

    @forki
    Member

    wow didn't know that Dictionary is not thread-safe.
    http://msdn.microsoft.com/en-us/library/dd287191%28v=vs.110%29.aspx seems to be the one I should use, right?

  12. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    :) Absolutely!

  13. forki commented on Jan 2, 2015

    @forki
    Member

    WTF. Why isn't the thread-safe version the default?
    Ok I changed it.

  14. isaacabraham commented on Jan 2, 2015

    @isaacabraham
    Contributor

    Most of the collections in the BCL aren't thread safe.

  15. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    All concurrent collection are much slower, for example, here http://stackoverflow.com/questions/15252115/concurrentdictionary-performance-at-a-single-thread-misunderstanding ConcurrentDictionary is 3x slower than Dictionary.

  16. forki commented on Jan 2, 2015

    @forki
    Member

    Yep I understan that - so I think in special case one could switch to UnsafeButFasterDictionary ;-)

    Do you think we can close this? Or do you still see this error

  17. vasily-kirichenko commented on Jan 2, 2015

    @vasily-kirichenko
    ContributorAuthor

    I don't see it anymore. If it returns, I reopen this issue.

  18. haf commented on Jan 2, 2015

    @haf
    Member

    Just beware that ConcurrentDictionary has no notion of strict serialisability as:

    • there's no global time
    • you may perform double work when adding to the cache
    • you cannot be guaranteed to read-your-writes between threads

    Also note that ConcurrentDictionary is likely faster for your use-case of a cache, since your reads will outnumber your writes.

  19. forki commented on Jan 2, 2015

    @forki
    Member

    So all is well?

  20. haf commented on Jan 2, 2015

    @haf
    Member

    Yes ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions