Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Sync argument #40

Merged
merged 1 commit into from Mar 17, 2024
Merged

Add support for Sync argument #40

merged 1 commit into from Mar 17, 2024

Conversation

dcchut
Copy link
Owner

@dcchut dcchut commented Mar 17, 2024

This allows a Sync bound to be included on the future returned by the modified function:

#[async_recursion(Sync)]
async fn returned_future_is_send_and_sync() {}

As mentioned in this comment, a Sync bound on a Future is useless, since you can't do anything with a &Future. That being said, you may still want to store the resulting future in a struct, and you might want that struct to be Sync, so there are use-cases here.

Given that this is something that most people shouldn't need (nor use!), a Sync bound is not included by default.

@dcchut dcchut force-pushed the sync_bound branch 2 times, most recently from 44fad52 to bec0ae7 Compare March 17, 2024 13:10
@dcchut dcchut merged commit 2d0d43b into master Mar 17, 2024
4 checks passed
@dcchut dcchut deleted the sync_bound branch March 17, 2024 13:40
@dcchut dcchut mentioned this pull request Mar 17, 2024
convex-copybara bot pushed a commit to get-convex/convex-backend that referenced this pull request May 14, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [async-recursion](https://togithub.com/dcchut/async-recursion) | workspace.dependencies | minor | `1.0.5` -> `1.1.1` |

---

### Release Notes

<details>
<summary>dcchut/async-recursion (async-recursion)</summary>

### [`v1.1.1`](https://togithub.com/dcchut/async-recursion/releases/tag/v1.1.1)

[Compare Source](https://togithub.com/dcchut/async-recursion/compare/v1.1.0...v1.1.1)

#### What's Changed

-   Fix incorrect syn features by [@&#8203;dcchut](https://togithub.com/dcchut) in [dcchut/async-recursion#44

**Full Changelog**: dcchut/async-recursion@v1.1.0...v1.1.1

### [`v1.1.0`](https://togithub.com/dcchut/async-recursion/releases/tag/v1.1.0)

[Compare Source](https://togithub.com/dcchut/async-recursion/compare/v1.0.5...v1.1.0)

#### What's Changed

-   fix(docs): Add missing word in comment (follow-up to [#&#8203;30](https://togithub.com/dcchut/async-recursion/issues/30)) by [@&#8203;LeoniePhiline](https://togithub.com/LeoniePhiline) in [dcchut/async-recursion#31
-   Added lifetime bounds to nested references (fixes [#&#8203;34](https://togithub.com/dcchut/async-recursion/issues/34), [#&#8203;37](https://togithub.com/dcchut/async-recursion/issues/37)) in [dcchut/async-recursion#38
-   Added support for `Sync` argument (thanks [@&#8203;planetoryd](https://togithub.com/planetoryd)) in [dcchut/async-recursion#40

#### New Contributors

-   [@&#8203;LeoniePhiline](https://togithub.com/LeoniePhiline) made their first contribution in [dcchut/async-recursion#31

**Full Changelog**: dcchut/async-recursion@v1.0.5...v1.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday after 5pm and before 8pm" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/get-convex/convex).

GitOrigin-RevId: 4f5260c40f9e44a3710159f667c2f4d002bddbf6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant