Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Jan 18, 2024
1 parent 5114a13 commit 9abf594
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions crates/katana/rpc/src/starknet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,7 @@ impl StarknetApi {
T: Send + 'static,
{
let this = self.clone();
// create oneshot tokio channel
let (sender, receiver) = tokio::sync::oneshot::channel::<T>();
let _ = TokioTaskSpawner::new()
.unwrap()
.spawn_blocking(move || {
let res = func(this);
let _ = sender.send(res);
})
.await;
receiver.await.unwrap()
TokioTaskSpawner::new().unwrap().spawn_blocking(move || func(this)).await.unwrap()
}
}
#[async_trait]
Expand Down

0 comments on commit 9abf594

Please sign in to comment.