Skip to content

Conversation

@tnull
Copy link
Owner

@tnull tnull commented Jun 24, 2024

No description provided.

src/lib.rs Outdated
/// a thread-safe manner.
///
/// FIXME: Document runtime
pub fn with_runtime(&self, runtime: Arc<tokio::runtime::Runtime>) -> Result<(), Error> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call this start_with_runtime?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

self.with_runtime(runtime)
}

/// Starts the necessary background tasks, such as handling events coming from user input,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-nit for hack: Not sure if this doc is correct?
did we mean runtime coming from user input?

@tnull tnull force-pushed the 2024-06-start-with-runtime branch from 281cb67 to c64abf1 Compare June 25, 2024 13:41
@tnull
Copy link
Owner Author

tnull commented Jun 25, 2024

Force-pushed with the following changes:

> git diff-tree -U2  281cb67 c64abf1
diff --git a/src/lib.rs b/src/lib.rs
index 7facb39..41b87bd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -214,5 +214,5 @@ impl Node {
                let runtime =
                        Arc::new(tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap());
-               self.with_runtime(runtime)
+               self.start_with_runtime(runtime)
        }

@@ -224,5 +224,5 @@ impl Node {
        ///
        /// FIXME: Document runtime
-       pub fn with_runtime(&self, runtime: Arc<tokio::runtime::Runtime>) -> Result<(), Error> {
+       pub fn start_with_runtime(&self, runtime: Arc<tokio::runtime::Runtime>) -> Result<(), Error> {
                // Acquire a run lock and hold it until we're setup.
                let mut runtime_lock = self.runtime.write().unwrap();

Gonna land this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants