drogonframework / drogonframework/drogon
Loops other than event-loop thread- application locks up completely.
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
**Describe the bug**
The application locks up fully when "too much screen distance" is between DbClient + ORM Coro Mapper definition and location of usage.
If I define coro mappers, redis and db fast clients at the start of a code block (which executes if the client has successfully authenticated, there's no loops / if flows in that block anymore), the application locks up . not terminatable via CTRL-C and
20241003 20:00:57.504808 UTC 59703 FATAL It is forbidden to run loop on threads other than event-loop thread - EventLoop.cc:269
**To Reproduce**
Steps to reproduce the behavior:
File attached. Drogon 1.9.6-7 (occurs with both), trantor 1.5.20-21, spdlog on, clang 18.1.8, ubuntu 24.04 LTS server, postgres 16.4, dragonfly.
**Expected behavior**
For the code to not care where I define my coro mappers and redis client as long as they are accessible.
[ex.txt](https://github.com/user-attachments/files/17249532/ex.txt)
Contributor guide
Assessment
This issue has not been assessed yet.