You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The futures are created and immediately consumed in the same function where aggregate lives, so the borrow checker can verify that aggregate lives long enough.
160
+
let task1 = async{
159
161
let command = OrderCommand::Create(CreateOrderCommand{
// Run both tasks concurrently on the same thread.
180
+
// Run both tasks concurrently on the same thread. Awaited immediately in the same scope
181
+
// The futures are created and immediately consumed in the same function where aggregate lives, so the borrow checker can verify that aggregate lives long enough.
179
182
tokio::join!(task1, task2);
180
183
}
181
184
185
+
#[tokio::test]
186
+
asyncfnes_test_not_send_with_spawn_local(){
187
+
// Create a LocalSet to run !Send futures
188
+
let local = task::LocalSet::new();
189
+
190
+
local
191
+
.run_until(async{
192
+
let repository = InMemoryOrderEventRepository::new();
193
+
let aggregate = Rc::new(EventSourcedAggregate::new(
0 commit comments