Skip to main content

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.

7 votes
2 answers
682 views

The following code implements a basic coroutine scheduler that can be polled from the main loop, providing a lightweight alternative to multithreading. ...
mausys's user avatar
  • 199
3 votes
1 answer
52 views

I have implemented a timer in Jetpack Compose. It counts down a given amount of seconds. The remaining seconds are displayed. Moreover the past and remaining seconds are displayed as a circular graph. ...
michael.zech's user avatar
  • 5,042
4 votes
1 answer
94 views

I was trying to learn more about C++ 20 coroutines. After trying to read the documentation and watching few videos, I tried to write a timer that uses coroutines. ...
kiner_shah's user avatar
3 votes
0 answers
85 views

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 ...
Jake's user avatar
  • 131
2 votes
1 answer
91 views

Second try. This time rather than get() and operator bool make the handle be a range operator. The only difference in the ...
Loki Astari's user avatar
  • 97.7k
3 votes
2 answers
110 views

Lazy range generator. I know everybody's first example for co-routines. But want to get some feedback. The code ...
Loki Astari's user avatar
  • 97.7k
3 votes
1 answer
93 views

I'm reimplementing functionality originally written in Kotlin. It uses Dispatchers.Default which is recommended for CPU-intensive tasks like JSON parsing to start ...
Roman Galyaminskiy's user avatar
2 votes
1 answer
128 views

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 ...
Cipri's user avatar
  • 121
5 votes
1 answer
174 views

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 ...
Peilonrayz's user avatar
  • 44.6k
4 votes
1 answer
504 views

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 ...
Pangi's user avatar
  • 370
2 votes
1 answer
140 views

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 ...
serafean's user avatar
2 votes
2 answers
147 views

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? ...
woxihuanxiayua's user avatar
5 votes
0 answers
215 views

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 ...
Ammar Faizi's user avatar
5 votes
1 answer
418 views

This project is the natural extension to my attempt to make a templatedgenerator coroutine. This time, I tried what I called a "...
rafoo's user avatar
  • 335
6 votes
2 answers
4k views

Here is a coroutine generator class... Just like Python yields. It was a bit tedious to support both co_yield and co_return (...
rafoo's user avatar
  • 335

15 30 50 per page