Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb0002d753 | |||
| 3cd0997156 | |||
| 7f4e4e9719 | |||
| 57347acdb6 |
@@ -32,10 +32,6 @@ struct Session {
|
|||||||
signer: Signer,
|
signer: Signer,
|
||||||
}
|
}
|
||||||
|
|
||||||
// The host creates one component instance per connection and calls into it
|
|
||||||
// on a single thread, so this slot holds exactly one connection's session and
|
|
||||||
// is not shared state between connections. A WASI component has no other place
|
|
||||||
// to keep state between exported calls.
|
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static SESSION: RefCell<Option<Session>> = const { RefCell::new(None) };
|
static SESSION: RefCell<Option<Session>> = const { RefCell::new(None) };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user