mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 09:11:13 +01:00
Remove some inaccurate assertions about the main thread.
This commit is contained in:
parent
8aa3746cb8
commit
8a6b8bde9b
@ -98,8 +98,6 @@ final class StatusesTable: DatabaseTable {
|
||||
|
||||
func statusesDictionary(_ articleIDs: Set<String>) -> [String: ArticleStatus] {
|
||||
|
||||
assert(!Thread.isMainThread)
|
||||
|
||||
var d = [String: ArticleStatus]()
|
||||
|
||||
for articleID in articleIDs {
|
||||
@ -120,7 +118,6 @@ private extension StatusesTable {
|
||||
|
||||
func articleIDsWithNoCachedStatus(_ articleIDs: Set<String>) -> Set<String> {
|
||||
|
||||
assert(!Thread.isMainThread)
|
||||
return Set(articleIDs.filter { cache[$0] == nil })
|
||||
}
|
||||
|
||||
@ -171,8 +168,6 @@ private final class StatusCache {
|
||||
|
||||
// Replaces any cached statuses.
|
||||
|
||||
assert(!Thread.isMainThread)
|
||||
|
||||
for status in statuses {
|
||||
self[status.articleID] = status
|
||||
}
|
||||
@ -187,8 +182,6 @@ private final class StatusCache {
|
||||
|
||||
// Does not replace already cached statuses.
|
||||
|
||||
assert(!Thread.isMainThread)
|
||||
|
||||
for status in statuses {
|
||||
let articleID = status.articleID
|
||||
if let _ = self[articleID] {
|
||||
@ -200,11 +193,9 @@ private final class StatusCache {
|
||||
|
||||
subscript(_ articleID: String) -> ArticleStatus? {
|
||||
get {
|
||||
assert(!Thread.isMainThread)
|
||||
return dictionary[articleID]
|
||||
}
|
||||
set {
|
||||
assert(!Thread.isMainThread)
|
||||
dictionary[articleID] = newValue
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user