Questions tagged [coroutines]
Used for questions involving coroutine functionality; either from the language itself, provided by an external library, or when the code in question implements coroutines itself.
22 questions
2votes
0answers
62views
Bridging the gap between Spring's JdbcTemplate and Kotlin coroutines
I'm learning about Kotlin coroutines. I'm wondering if I can use them to increase the throughput of my spring-boot application which is currently very heavily dependent on jdbc connections, without ...
2votes
1answer
66views
C++ CoRoutine Second Try building a range
Second try. This time rather than get() and operator bool make the handle be a range operator. The only difference in the ...
0votes
0answers
31views
C++ CoRoutine First Try
Lazy range generator. I know everybody's first example for co-routines. But want to get some feedback. The code ...
4votes
1answer
64views
Consuming each Kafka partition in a separate proccess
I'm reimplementing functionality originally written in Kotlin. It uses Dispatchers.Default which is recommended for CPU-intensive tasks like JSON parsing to start ...
1vote
1answer
100views
Kotlin Compose authentication with Google and Facebook using a CircularProgressIndicator for UI loading
I had this problem: https://stackoverflow.com/questions/78528358/how-to-prevent-circularprogressindicator-from-freezing-during-authentication-in Now after fixing it, I want to make sure that this is ...
5votes
1answer
123views
Sorting songs with the ability to save and resume partial sorts
I listen to a lot of music (~4k h/y) and managing thousands of songs is a bit of a challenging. To improve my listening experience I want to better organize my collection. One thing I want to do is ...
1vote
0answers
63views
Stand/Bench for testing emergency situations for 2p2 networks in games
In fact, this is a throttling proxy. It can work in two modes: "paired" and "multi-Client". In "pair" mode, two clients connect to each other through a proxy, very ...
4votes
1answer
462views
Single threaded epoll based coroutine library for C++, Linux
I've implemented a small single-header library over the C++20 coroutines. This library only works on a single thread and it is limited to Linux because it is also based on epoll. The library does not ...
2votes
1answer
105views
sendmsg() scatter-gather coroutine awaiter, optimized suspending
My attempt at an Awaiter for sending scatter-gather data over an open file descriptor. Tested only on gcc-13.1.1 Micro-optimizing by suspending the coroutine only ...
2votes
2answers
119views
Finding files using multiple coroutines
I'm trying to write a simple program to find a certain file name within a directory tree. I use up to 30 coroutines. Is there anything wrong with this code or what needs to be improved? ...
5votes
0answers
203views
Single-threaded coroutine in C (Linux x86-64)
Background Story I crafted a simple single-threaded coroutine in C, running on Linux x86-64. Short Technical Explanation 1) Task There are two types of tasks in this implementation. Main task. This ...
5votes
1answer
387views
C++20 Coroutine Task
This project is the natural extension to my attempt to make a templatedgenerator coroutine. This time, I tried what I called a "...
5votes
2answers
4kviews
C++20 Coroutine Generator
Here is a coroutine generator class... Just like Python yields. It was a bit tedious to support both co_yield and co_return (...
3votes
0answers
109views
Experimenting with C++20 coroutines to create Python-style generator functions
I've been playing around with the coroutines implementation in gcc 10.2.0 (Debian build) based on the sparse documentation at https://en.cppreference.com/w/cpp/language/coroutines . The target, for ...
4votes
1answer
2kviews
Correct flow between Kotlin, Realm and ViewModels using Coroutines
I'm stepping back into Android after being away from it for about a year. Trying to get an out of date app of mine back on its feet, and continuing work on it. The app was written using Java, MVP, ...