mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Bump supported Crystal version
This commit is contained in:
parent
eef66de68c
commit
da07f99d3d
2 changed files with 1 additions and 14 deletions
|
@ -19,6 +19,6 @@ dependencies:
|
||||||
github: kemalcr/kemal
|
github: kemalcr/kemal
|
||||||
version: ~> 0.26.0
|
version: ~> 0.26.0
|
||||||
|
|
||||||
crystal: 0.31.0
|
crystal: 0.31.1
|
||||||
|
|
||||||
license: AGPLv3
|
license: AGPLv3
|
||||||
|
|
|
@ -237,16 +237,3 @@ class HTTP::Client
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
struct Crystal::ThreadLocalValue(T)
|
|
||||||
@values = Hash(Thread, T).new
|
|
||||||
|
|
||||||
def get(&block : -> T)
|
|
||||||
th = Thread.current
|
|
||||||
if !@values[th]?
|
|
||||||
@values[th] = yield
|
|
||||||
else
|
|
||||||
@values[th]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
Loading…
Reference in a new issue