Skip to content

Commit

Permalink
Update LeafSources.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM committed Jul 28, 2023
1 parent e791f5c commit 423abf5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/LeafKit/LeafSource/LeafSources.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ public final class LeafSources: @unchecked Sendable {
guard !s.isEmpty else { return eL.makeFailedFuture(LeafError(.noTemplateExists(t))) }
var _more = s
let key = _more.removeFirst()
lock.lock()
let source = sources[key]!
lock.unlock()
let source = self.lock.withLock { sources[key]! }
let more = _more

do {
Expand Down

0 comments on commit 423abf5

Please sign in to comment.