From 539aecd793ee0ce55833eef98c3049dd0bf8127d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 28 Nov 2018 18:10:54 +0200 Subject: Started working on Embedded Storage and machine studio Storage module. --- .../Tango.Core/Threading/ThreadFactory.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs (limited to 'Software/Visual_Studio/Tango.Core/Threading') diff --git a/Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs b/Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs new file mode 100644 index 000000000..80e4d2d6c --- /dev/null +++ b/Software/Visual_Studio/Tango.Core/Threading/ThreadFactory.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Tango.Core.Threading +{ + public class ThreadFactory + { + public static Thread StartNew(Action action) + { + Thread t = new Thread(() => + { + action(); + }); + t.IsBackground = true; + t.Start(); + return t; + } + } +} -- cgit v1.3.1