foil icon indicating copy to clipboard operation
foil copied to clipboard

Bump minimatch from 3.0.4 to 3.1.2

Open dependabot[bot] opened this issue 2 years ago • 0 comments

Bumps minimatch from 3.0.4 to 3.1.2.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

dependabot[bot] avatar Nov 12 '22 00:11 dependabot[bot]

can you explain your use-case more, why do you want to grab the lock over multiple gets/sets?

ericphanson avatar Nov 20 '23 22:11 ericphanson

ReentrantLock seems preferred in general over SpinLock reading through the julia issue tracker / PRs, so it would make sense to me to switch. But I assume @jutho had a reason for choosing SpinLock in the first place. Maybe we can try to do some benchmarking to see what the tradeoffs are.

ericphanson avatar Jan 25 '24 13:01 ericphanson

I think I chose the SpinLock because it was claimed to be more performant, and I assumed that the requirements for using it were fulfilled. But I have very little experience with multithreaded code and locks and all the unexpected complications that can arise, so a ReentrantLock might be the safer solution.

I am interested in the use case here. The goal is that LRU takes care of the locking in a way that is oblivious to the user, so the user should not manually have to interfere with this. If you are trying to build a solution were you need to manually control the lock, is it even worth using LRU. Then again, I could see that you maybe want to recycle part of the implementation, so I am definitely open to this suggestion.

Jutho avatar Jan 25 '24 13:01 Jutho

Please apologize the delayed reply, I missed that thread. Regarding the question as what is the use case of taking a lock over multiple gets/sets, one simple example is where one would like to implement a method which acts as get_or_new:

function get_or_new(cache::LRU{K,V}, key::K, args...)
    lock(cache) do
        if haskey(cache, key)
            cache[key]
        else
            created = V(args...)
            cache[key] = created
            return created
        end
    end
end

Now such user-level locks become easiest if one uses a ReentrantLock, as otherwise users of LRU would have to allocate their own lock, as they cannot re-lock SpinLock.

gbrgr avatar Jan 25 '24 19:01 gbrgr

I think this specific api is provided already: https://github.com/JuliaCollections/LRUCache.jl#getdefaultcallable-lrulru-key

ericphanson avatar Jan 25 '24 19:01 ericphanson

Thanks I missed that. In any case, I think it might be worth considering changing that lock in case performance gains can be made.

gbrgr avatar Jan 25 '24 19:01 gbrgr