mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 04:50:36 +00:00
Add note about smol and async-executor in scheduler struct
This commit is contained in:
parent
2e9ff358cc
commit
5a6a8a0931
1 changed files with 6 additions and 2 deletions
|
@ -44,8 +44,12 @@ pub(crate) struct Scheduler<'fut> {
|
|||
state and receiver to know when we have run to completion.
|
||||
If we have no senders left, we have run to completion.
|
||||
|
||||
Once we no longer store futures in our scheduler, we can
|
||||
get rid of the lifetime on it, store it in our lua app
|
||||
We should also investigate using smol / async-executor and its
|
||||
LocalExecutor struct which does not impose the 'static lifetime
|
||||
restriction on all of the futures spawned on it, unlike tokio.
|
||||
|
||||
If we no longer store futures directly in our scheduler, we
|
||||
can get rid of the lifetime on it, store it in our lua app
|
||||
data as a Weak<Scheduler>, together with a Weak<Lua>.
|
||||
|
||||
In our lua async functions we can then get a reference to this,
|
||||
|
|
Loading…
Reference in a new issue