# Signals: Async/sync mixed receivers

**URL:** <https://forum.djangoproject.com/t/signals-async-sync-mixed-receivers/45187>\
**Category:** Async\
**Created:** [May 26, 2026, 7:31am UTC](https://forum.djangoproject.com/t/signals-async-sync-mixed-receivers/45187 "2026-05-26T07:31:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohaas](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ohaas/32/18687_2.png) [@ohaas](https://forum.djangoproject.com/u/ohaas)\
**Post date:** [May 26, 2026, 7:31am UTC](https://forum.djangoproject.com/t/signals-async-sync-mixed-receivers/45187/1 "2026-05-26T07:31:04Z")

</div>

Hello! I’ve been looking into getting some of my favorite packages ready for async.

One caveat I encountered is how to use signals, provided a package aims for a no-downsides approach to simultaneous sync & async support.

* * *

My understanding is that `Signal.send()` and `Signal.asend()` both handle mixed receivers but always wrap the “wrong” side via `async_to_sync` or `sync_to_async`.

The first (non-) issue for a library is the dispatch side, and here it seems to be easy and one has to just use `Signal.send()` and `Signal.asend()` for sync and async paths, respectively. Some code duplication as always, but still fine.

The second issue is on the receiver-side, which seems a bit more difficult. Basically it boils down to: Which version of the handler should we connect: sync or async?

I’ve considered workarounds like having a config in the packages for this which decides for a project whether to prefer sync or async handlers, e.g. `ASYNC_FIRST = True`, but that would be a bit manual and would not be ideal for preject where there is mixed sync and async.

Ideally we would be able to connect both, and Django’s signal dispatcher would use the more fitting one depending on how it was called.

```python
signal.connect(do_something_on_save)
signal.connect(ado_something_on_save, pair=do_something_on_save)

```

* * *

I’m wondering whether my reasoning is correct or whether I’m missing something.

---

<div class="post-metadata">

**Author:** ![Arfey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/arfey/32/32504_2.png) [@Arfey](https://forum.djangoproject.com/u/Arfey)\
**Post date:** [May 26, 2026, 2:28pm UTC](https://forum.djangoproject.com/t/signals-async-sync-mixed-receivers/45187/2 "2026-05-26T14:28:01Z")

</div>

Hey 👋

We’d need something along the same lines for [https://github.com/Arfey/django-async-backend](https://github.com/Arfey/django-async-backend). I’ve also drafted a DEP here: [https://github.com/django/deps/pull/103](https://github.com/django/deps/pull/103). Any thoughts are welcome.

---

<div class="post-metadata">

**Author:** ![ohaas](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ohaas/32/18687_2.png) [@ohaas](https://forum.djangoproject.com/u/ohaas)\
**Post date:** [May 26, 2026, 7:24pm UTC](https://forum.djangoproject.com/t/signals-async-sync-mixed-receivers/45187/3 "2026-05-26T19:24:39Z")

</div>

Thanks for the response!

So one thing I obviously missed was DEPs 🙂 .  
I’ll chime in there and maybe I can contribute something.
