ngg opened a new pull request, #164:
URL: https://github.com/apache/opendal-yinyang/pull/164
# Which issue does this PR close?
Closes #163.
# Rationale for this change
`run()` borrows the engine exclusively, but two private async helpers borrow
it through `&self`. Sending that shared reference across threads requires
`Sync`, which the engine’s SQLite connection lacks.
# What changes are included in this PR?
Change `observe` and `capture_remote_artifact` to take `&mut self`. Their
futures then hold an exclusive reference, which can move between threads
because the engine is `Send`. A compile-time test checks the `run()` future for
both built-in adapters.
# Are there any user-facing changes?
A Direct or Managed engine can now run in `tokio::spawn(async move {
engine.run().await })`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]