Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProtectedInvoke()

static void Terraria.Utilities.FileUtilities.ProtectedInvoke ( Action action)
inlinestatic

Definition at line 223 of file FileUtilities.cs.

224 {
225 bool isBackground = Thread.CurrentThread.IsBackground;
226 try
227 {
228 Thread.CurrentThread.IsBackground = false;
229 action();
230 }
231 finally
232 {
233 Thread.CurrentThread.IsBackground = isBackground;
234 }
235 }
static Thread CurrentThread
Definition Thread.cs:312

References System.action, and System.Threading.Thread.CurrentThread.

Referenced by Terraria.Achievements.AchievementManager.Save(), Terraria.Map.MapHelper.SaveMap(), Terraria.Player.SavePlayer(), and Terraria.IO.WorldFile.SaveWorld().