Skip to content

add the ability to stop a spawned thread #222

@nicbus

Description

@nicbus

rgb-node can be started as a thread but there is no way (I know of) to stop it

being able to gracefully stop the running thread is useful as it allows the spawning thread to bring operations to a halt in order to perform operations that are not possible while the service is running (e.g. moving files to a new location) or to re-launch the service with another configuration (e.g. different endpoints for other services)

note: the same idea also applies to other services (e.g. stored)

as discussed in a dev call, looks like a sensible way to implement this feature would be to add an API that allows the spawning thread to request a graceful stop, providing some identification token to prove it's the spawning thread (other threads should not be able to do the same)

@dr-orlovsky could you please implement this API?

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicLarge or meta-issues with multiple related issues and tasksfeatureNew functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions