Address soundness hole in cycle prevention

This commit is contained in:
TechnoPorg committed 2026-01-29 06:56:17 +01:00
1 parent 4ad88bcd68
commit f82205baf4
80 files changed
+730 -717

No files matched your search

+3 -3
View File
@@ -14,7 +14,7 @@ async fn test_memory_usage_10000_nodes() {
let before_build = memory_usage_hint();
// Create 10,000 nodes
let tasks: Vec<_> = (0..10_000)
let mut tasks: Vec<_> = (0..10_000)
.map(|i| dag.add_task(task_fn(move |_: ()| async move { i })))
.collect();
@@ -34,8 +34,8 @@ async fn test_memory_usage_10000_nodes() {
println!("Additional memory for execution: ~{} bytes", exec_memory);
// Verify some results
assert_eq!(dag.get(&tasks[0]).unwrap(), 0);
assert_eq!(dag.get(&tasks[9999]).unwrap(), 9999);
assert_eq!(dag.get(tasks.swap_remove(9999)).unwrap(), 9999);
assert_eq!(dag.get(tasks.swap_remove(0)).unwrap(), 0);
// Memory should be reasonable (< 100MB for 10k simple nodes)
assert!(