All Projects → satoshun → Coroutineautodispose

satoshun / Coroutineautodispose

Licence: apache-2.0
Coroutine AutoDispose is an Kotlin Coroutine library for automatically disposal.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Coroutineautodispose

Spring Kotlin Coroutine
Kotlin coroutine support for Spring.
Stars: ✭ 359 (+680.43%)
Mutual labels:  coroutine
Posterus
Composable async primitives with cancelation, control over scheduling, and coroutines. Superior replacement for JS Promises.
Stars: ✭ 536 (+1065.22%)
Mutual labels:  coroutine
May actor
Local Actor library based on may
Stars: ✭ 19 (-58.7%)
Mutual labels:  coroutine
Hyperf
🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.
Stars: ✭ 4,206 (+9043.48%)
Mutual labels:  coroutine
Swow
Coroutine-based concurrency library for PHP
Stars: ✭ 475 (+932.61%)
Mutual labels:  coroutine
Swoft
🚀 PHP Microservice Full Coroutine Framework
Stars: ✭ 5,420 (+11682.61%)
Mutual labels:  coroutine
Net
Android上强大的网络请求
Stars: ✭ 344 (+647.83%)
Mutual labels:  coroutine
Saber
⚔️ Saber, PHP异步协程HTTP客户端 | PHP Coroutine HTTP client - Swoole Humanization Library
Stars: ✭ 866 (+1782.61%)
Mutual labels:  coroutine
Libfiber
The high performance coroutine library for Linux/FreeBSD/MacOS/Windows, supporting select/poll/epoll/kqueue/iocp/windows GUI
Stars: ✭ 519 (+1028.26%)
Mutual labels:  coroutine
Paysdk
PHP 集成支付 SDK ,集成了支付宝、微信支付的支付接口和其它相关接口的操作。支持 php-fpm 和 Swoole,所有框架通用。宇润PHP全家桶技术支持群:17916227
Stars: ✭ 723 (+1471.74%)
Mutual labels:  coroutine
Coobjc
coobjc provides coroutine support for Objective-C and Swift. We added await method、generator and actor model like C#、Javascript and Kotlin. For convenience, we added coroutine categories for some Foundation and UIKit API in cokit framework like NSFileManager, JSON, NSData, UIImage etc. We also add tuple support in coobjc.
Stars: ✭ 3,921 (+8423.91%)
Mutual labels:  coroutine
Easyswoole
swoole,easyswoole,swoole framework
Stars: ✭ 4,409 (+9484.78%)
Mutual labels:  coroutine
Imi
imi 是基于 Swoole 的 PHP 协程开发框架,它支持 Http、Http2、WebSocket、TCP、UDP、MQTT 等主流协议的服务开发,特别适合互联网微服务、即时通讯聊天im、物联网等场景!。QQ群:17916227
Stars: ✭ 680 (+1378.26%)
Mutual labels:  coroutine
Ananas
A C++11 RPC framework based on future and protobuf, with utility: timer,ssl,future/promise,log,coroutine,etc
Stars: ✭ 361 (+684.78%)
Mutual labels:  coroutine
Sylar
C++高性能分布式服务器框架,webserver,websocket server,自定义tcp_server(包含日志模块,配置模块,线程模块,协程模块,协程调度模块,io协程调度模块,hook模块,socket模块,bytearray序列化,http模块,TcpServer模块,Websocket模块,Https模块等, Smtp邮件模块, MySQL, SQLite3, ORM,Redis,Zookeeper)
Stars: ✭ 895 (+1845.65%)
Mutual labels:  coroutine
Concurrencpp
Modern concurrency for C++. Tasks, executors, timers and C++20 coroutines to rule them all
Stars: ✭ 340 (+639.13%)
Mutual labels:  coroutine
Yappi
Yet Another Python Profiler, but this time thread&coroutine&greenlet aware.
Stars: ✭ 595 (+1193.48%)
Mutual labels:  coroutine
Easyandroid
一个完整基于kotlin的安卓开发框架,采用了mvvm设计模式。涵盖了: 1、基于retrofit2封装的通过kotlin协程实现的网络框架 2、基于阿里开源router修改的api-router实现项目模块化 3、基于glide的图片加载缓存框架 4、基于room实现的往来数据缓存加载 5、基于step实现的数据异步提交 6、基于PreferenceHolder实现的本地数据快速存储 7、基于mlist实现的简单复杂列表的快速开发扩展 8、定制的toolbar可以自适应异形屏,挖孔屏,水滴屏等等。。 本框架几乎涵盖了开发所需的所有模块组件。简单fork之后就可以基于框架快速开发。
Stars: ✭ 33 (-28.26%)
Mutual labels:  coroutine
Swoft Db
[READ ONLY] Database Compoment for Swoft
Stars: ✭ 25 (-45.65%)
Mutual labels:  coroutine
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+1400%)
Mutual labels:  coroutine

Coroutine AutoDispose

Maven Central Android Arsenal

Coroutine AutoDispose is an Kotlin Coroutine library for automatically disposal.

Overview

Often, Coroutine subscriptions need to stop in response to some event (like a Activity#onStop()). In order to support this common scenario in Coroutine.

autoDisposeScope

This library provide a autoDisposeScope extension method. It can be used like a lifecycleScope.

It create a CoroutineScope for automatically disposal with Android Architecture Component Lifecycle events.

class MainActivity : AppCompatActivity() {
  override fun onCreate(savedInstanceState: Bundle?) {
    // automatically dispose when onDestroy
    autoDisposeScope.launch {
      ...
    }
  }

  override fun onResume() {
    // automatically dispose when onPause
    autoDisposeScope.launch {
      ...
    }
  }
}

It can also be uses with Fragment and View.

Lifecycle.autoDispose(Job)

This Job an automatically disposal with Android Lifecycle events.

val job = launch { ... }
lifecycle.autoDispose(job)

Use with RecyclerView

CoroutineScope can be used from a itemView of RecyclerView.ViewHolder.

override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
  holder.itemView.autoDisposeScope.launch {
    ...
  }
}

Download

implementation 'com.github.satoshun.coroutine.autodispose:autodispose:${version}'

etc

This library referred uber/AutoDispose.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].