diff --git a/src/Utility/AsyncTask.vala b/src/Utility/AsyncTask.vala index fd7d4c2..ed4b91e 100644 --- a/src/Utility/AsyncTask.vala +++ b/src/Utility/AsyncTask.vala @@ -144,7 +144,7 @@ public abstract class AsyncTask : GLib.Object{ try { //start thread for reading output stream - Thread.create (read_stdout, true); + new Thread.try ("async-task-stdout-reader", () => {read_stdout();}); } catch (Error e) { log_error ("AsyncTask.begin():create_thread:read_stdout()"); log_error (e.message); @@ -152,7 +152,7 @@ public abstract class AsyncTask : GLib.Object{ try { //start thread for reading error stream - Thread.create (read_stderr, true); + new Thread.try ("async-task-stderr-reader", () => {read_stderr();}); } catch (Error e) { log_error ("AsyncTask.begin():create_thread:read_stderr()"); log_error (e.message); diff --git a/src/Utility/TimeoutCounter.vala b/src/Utility/TimeoutCounter.vala index 5d45534..6145c87 100644 --- a/src/Utility/TimeoutCounter.vala +++ b/src/Utility/TimeoutCounter.vala @@ -44,7 +44,7 @@ public class TimeoutCounter : GLib.Object { try { active = true; - Thread.create (start_counter_thread, true); + new Thread.try ("timeout-counter",() => { start_counter_thread();}); } catch (Error e) { log_error (e.message); @@ -58,7 +58,7 @@ public class TimeoutCounter : GLib.Object { try { active = true; - Thread.create (start_counter_thread, true); + new Thread.try ("timeout-counter", () => {start_counter_thread();}); } catch (Error e) { log_error (e.message);