Skip to content

Commit

Permalink
comments added
Browse files Browse the repository at this point in the history
  • Loading branch information
marinofaggiana committed Dec 18, 2024
1 parent 5f704fa commit 4a9ec35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iOSClient/Files/NCFiles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ class NCFiles: NCCollectionViewCommon {
return super.reloadDataSource()
}

// This is only a fail safe "dead lock", I don't think the timeout will ever be called but at least nothing gets stuck, if after 5 sec. (which is a long time in this routine), the semaphore is still locked
//
if self.semaphoreReloadDataSource.wait(timeout: .now() + 5) == .timedOut {
self.semaphoreReloadDataSource.signal()
}
Expand Down
2 changes: 2 additions & 0 deletions iOSClient/Media/NCMedia.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ class NCMedia: UIViewController {
return
}

// This is only a fail safe "dead lock", I don't think the timeout will ever be called but at least nothing gets stuck, if after 5 sec. (which is a long time in this routine), the semaphore is still locked
//
if self.semaphoreNotificationCenter.wait(timeout: .now() + 5) == .timedOut {
self.semaphoreNotificationCenter.signal()
}
Expand Down

0 comments on commit 4a9ec35

Please sign in to comment.