mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-27 17:29:20 +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] {
|
func statusesDictionary(_ articleIDs: Set<String>) -> [String: ArticleStatus] {
|
||||||
|
|
||||||
assert(!Thread.isMainThread)
|
|
||||||
|
|
||||||
var d = [String: ArticleStatus]()
|
var d = [String: ArticleStatus]()
|
||||||
|
|
||||||
for articleID in articleIDs {
|
for articleID in articleIDs {
|
||||||
@ -120,7 +118,6 @@ private extension StatusesTable {
|
|||||||
|
|
||||||
func articleIDsWithNoCachedStatus(_ articleIDs: Set<String>) -> Set<String> {
|
func articleIDsWithNoCachedStatus(_ articleIDs: Set<String>) -> Set<String> {
|
||||||
|
|
||||||
assert(!Thread.isMainThread)
|
|
||||||
return Set(articleIDs.filter { cache[$0] == nil })
|
return Set(articleIDs.filter { cache[$0] == nil })
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,8 +168,6 @@ private final class StatusCache {
|
|||||||
|
|
||||||
// Replaces any cached statuses.
|
// Replaces any cached statuses.
|
||||||
|
|
||||||
assert(!Thread.isMainThread)
|
|
||||||
|
|
||||||
for status in statuses {
|
for status in statuses {
|
||||||
self[status.articleID] = status
|
self[status.articleID] = status
|
||||||
}
|
}
|
||||||
@ -187,8 +182,6 @@ private final class StatusCache {
|
|||||||
|
|
||||||
// Does not replace already cached statuses.
|
// Does not replace already cached statuses.
|
||||||
|
|
||||||
assert(!Thread.isMainThread)
|
|
||||||
|
|
||||||
for status in statuses {
|
for status in statuses {
|
||||||
let articleID = status.articleID
|
let articleID = status.articleID
|
||||||
if let _ = self[articleID] {
|
if let _ = self[articleID] {
|
||||||
@ -200,11 +193,9 @@ private final class StatusCache {
|
|||||||
|
|
||||||
subscript(_ articleID: String) -> ArticleStatus? {
|
subscript(_ articleID: String) -> ArticleStatus? {
|
||||||
get {
|
get {
|
||||||
assert(!Thread.isMainThread)
|
|
||||||
return dictionary[articleID]
|
return dictionary[articleID]
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
assert(!Thread.isMainThread)
|
|
||||||
dictionary[articleID] = newValue
|
dictionary[articleID] = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user