This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import kotlinx.coroutines.channels.Channel | |
| import kotlinx.coroutines.coroutineScope | |
| suspend fun main() = coroutineScope<Unit> { | |
| val receive = Channel<Int>() | |
| receive.cancel() // ReceiveChannel | |
| // java.util.concurrent.CancellationException: RendezvousChannel was cancelled | |
| runCatching { receive.send(1) }.onFailure { println(it) } | |
| val send = Channel<Int>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // swift-tools-version:5.8 | |
| import PackageDescription | |
| let package = Package( | |
| name: "MyPackage", | |
| platforms: [ | |
| .iOS(.v11) | |
| ], | |
| products: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Configure sibling composite projects (`../<project>`) by adding `composite.<project>=true` to `local.properties`. | |
| java.util.Properties() | |
| .apply { | |
| rootProject.projectDir | |
| .resolve("local.properties") | |
| .normalize() | |
| .takeIf(File::exists) | |
| ?.let { java.io.FileInputStream(it) } | |
| ?.use(::load) | |
| } |
OlderNewer