CodeChain-io / CodeChain-io/remote-trait-object
Why the port must be dropped when the context is dropped?
- Lingua principale
- Rust
- Stelle
- 13
- Fork
- 5
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
https://github.com/CodeChain-io/remote-trait-object/blob/7ac07c741059ae583a05143a62cd6b07898e1c0b/remote-trait-object/src/context.rs#L63
Currently, it fails to drop the context when the port is still held by others. But, there is no way to guarantee whether all other holders released before the context dropped.
How about dropping context calls shutdown and making the methods of the `Port` returns a `Result`?
It also should make the shutdown of the `Port` takes the mutable reference of the self. It means the user can access the port after shutdown, but I think this would be safer.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Leggi remote-trait-object/src/context.rs alla riga 63, quindi traccia come interagiscono attualmente la proprietà di Context e Port e l’arresto. Risolvi la semantica proposta dell’arresto e dell’API che restituisce Result prima di modificare qualsiasi cosa; il lavoro è completato quando il comportamento alla rimozione di Context mentre i Ports rimangono mantenuti è definito e implementato esplicitamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- distributed-systems
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100