DismissedLight
DismissedLight
I'm using this inside a ItemRepeater's ItemTemplate Somethins like this ``` xml ... ... ... ```
`ImageZoomIn/OutAnimation` are simply classes inherited from `ImplicitAnimation` and change the Scale property of the applied `Border`
I guess it's that when outside element is "loaded" the inner one is not "ready" yet. After few milliseconds when the inner element is loaded this issue is gone.
@michael-hawker Any update on this?
Might be related https://github.com/microsoft/microsoft-ui-xaml/issues/4266
可以试试这个 ``` C# internal static class TokenBucketRateLimiterExtension { public static int Acquire(this TokenBucketRateLimiter rateLimiter, int permits, out TimeSpan retryAfter) { int count = Math.Min(permits, (int)Volatile.Read(ref PrivateGetTokenCount(rateLimiter))); return rateLimiter.AttemptAcquire(count).TryGetMetadata(MetadataName.RetryAfter, out retryAfter)...
@Eric-Joker 我最终实际体验了一下还是改成了下面的样子  带count的Replenish方便返还 Read Span buffer 实际上没填充的字节数,这样会更加的准确
Update: 
> > 返还 Read Span buffer 实际上没填充的字节数 > > emm?没太明白,现在的实现就是根据ReadAsync返回的值来租用令牌的 我的实现是尝试获取buffer长度的令牌,然后再读的,由于读取的长度可能会比buffer小所以我加了返还 如果你是在write时限速就不一样了
其实我突然发现,都已经lock了,理论上是不需要Volatile.Read的