wip: more work on suspense and documentation
This commit is contained in:
1 parent
4837d8e741
commit
37ed4bed8c
14 files changed
+240
-192
No files matched your search
@@ -11,15 +11,13 @@
|
||||
|
||||
use std::{
|
||||
cell::Cell,
|
||||
pin::Pin,
|
||||
sync::{Arc, RwLock},
|
||||
task::{Context, Poll},
|
||||
};
|
||||
|
||||
use futures_util::{stream::FuturesUnordered, Future, Stream, StreamExt};
|
||||
use slotmap::{DefaultKey, SlotMap};
|
||||
|
||||
use crate::innerlude::{EventTrigger, FiberTask, ScopeIdx};
|
||||
use crate::innerlude::{EventTrigger, FiberTask, ScopeId};
|
||||
|
||||
pub type TaskSubmitter = Arc<dyn Fn(FiberTask)>;
|
||||
|
||||
@@ -117,11 +115,11 @@ pub struct TaskHandle {
|
||||
|
||||
pub struct DTask {
|
||||
fut: FiberTask,
|
||||
originator: ScopeIdx,
|
||||
originator: ScopeId,
|
||||
dead: Cell<bool>,
|
||||
}
|
||||
impl DTask {
|
||||
pub fn new(fut: FiberTask, originator: ScopeIdx) -> Self {
|
||||
pub fn new(fut: FiberTask, originator: ScopeId) -> Self {
|
||||
Self {
|
||||
fut,
|
||||
originator,
|
||||
@@ -129,7 +127,7 @@ impl DTask {
|
||||
}
|
||||
}
|
||||
pub fn debug_new(fut: FiberTask) -> Self {
|
||||
let originator = ScopeIdx::default();
|
||||
let originator = ScopeId::default();
|
||||
Self {
|
||||
fut,
|
||||
originator,
|
||||
|
||||
Reference in new issue
Block a user