Skip to content

Commit

Permalink
Deadlock on supplementary nodes (#36)
Browse files Browse the repository at this point in the history
* Fix for block on main thread when using supplementary nodes

* 0.4.1

* 0.4.1
  • Loading branch information
foxware00 authored and dangthaison91 committed Sep 2, 2019
1 parent 326754a commit 0e6eea7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

11 changes: 6 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

## RxASDataSources

[![Platforms](https://img.shields.io/cocoapods/p/RxASDataSources.svg)](https://cocoapods.org/pods/RxASDataSources)
Expand All @@ -12,8 +13,8 @@
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [CocoaPods](#cocoapods)
- [Carthage](#carthage)
- [CocoaPods](#cocoapods)
- [Carthage](#carthage)
- [Usage](#usage)
- [License](#license)

Expand All @@ -27,9 +28,9 @@

## Requirements

- iOS 8.0+
- Xcode 9.0+
- RxSwift 4.0 & Texture 2.5
- iOS 9.0+
- Xcode 10.1+
- RxSwift 5.0 & Texture 2.8

## Installation

Expand Down
6 changes: 3 additions & 3 deletions RxASDataSources.podspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Pod::Spec.new do |s|
s.name = 'RxASDataSources'
s.version = '0.3.4'
s.version = '0.4.1'
s.license = { :type => "MIT", :file => "LICENSE" }
s.summary = 'RxDataSources for AsyncDisplayKit/Texture supports ASTableNode/ASCollectionNode'
s.homepage = 'https://github.com/RxSwiftCommunity/RxASDataSources'
s.social_media_url = 'https://twitter.com/dangthaison91'
s.authors = { "Dang Thai Son" => "[email protected]" }
s.source = { :git => "https://github.com/RxSwiftCommunity/RxASDataSources.git", :tag => s.version.to_s }

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.requires_arc = true
s.swift_version = '5.0'
s.swift_versions = '5.0'

s.source_files = "Sources/**/*.swift"
s.framework = "Foundation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ open class ASCollectionSectionedDataSource<S: SectionModelType>: NSObject, ASCol

fileprivate static func configureSupplementaryViewBlockNotSet(dataSource: ASCollectionSectionedDataSource<S>, node: ASCollectionNode, nodeForSupplementaryElementOfKind kind: String, indexPath: IndexPath) -> ASCellNodeBlock {
// Users expect collectionNode(_nodeForSupplementaryElementOfKind:at:) will be executed in main thread according to api doc.
return { DispatchQueue.main.sync(execute: { dataSource.collectionNode(node, nodeForSupplementaryElementOfKind: kind, at: indexPath) }) }
let cellNode = dataSource.collectionNode(node, nodeForSupplementaryElementOfKind: kind, at: indexPath)
return { cellNode }
}

public init(
Expand Down

0 comments on commit 0e6eea7

Please sign in to comment.