aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/task.rs')
-rw-r--r--components/util/task.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/util/task.rs b/components/util/task.rs
index f286efe5bc3..f38d87d0907 100644
--- a/components/util/task.rs
+++ b/components/util/task.rs
@@ -15,6 +15,11 @@ pub fn spawn_named<S: IntoMaybeOwned<'static>>(name: S, f: proc():Send) {
builder.spawn(f);
}
+pub fn spawn_named_native<S: IntoMaybeOwned<'static>>(name: S, f: proc():Send) {
+ let builder = task::TaskBuilder::new().named(name).native();
+ builder.spawn(f);
+}
+
/// Arrange to send a particular message to a channel if the task fails.
pub fn spawn_named_with_send_on_failure<T: Send>(name: &'static str,
state: task_state::TaskState,