Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RunOnceAction.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Threading
;
3
4
namespace
ReLogic.Content
;
5
6
public
static
class
RunOnceAction
7
{
8
public
static
Action
OnlyRunnableOnce
(
this
Action
action
)
9
{
10
return
delegate
11
{
12
Interlocked
.
Exchange
(ref
action
,
null
)?.Invoke();
13
};
14
}
15
}
ReLogic.Content.RunOnceAction.OnlyRunnableOnce
static Action OnlyRunnableOnce(this Action action)
Definition
RunOnceAction.cs:8
ReLogic.Content.RunOnceAction
Definition
RunOnceAction.cs:7
System.Threading.Interlocked.Exchange
static int Exchange(ref int location1, int value)
System.Threading.Interlocked
Definition
Interlocked.cs:9
ReLogic.Content
Definition
IAssetReader.cs:5
System.Threading
Definition
TaskToApm.cs:3
System.ExceptionArgument.action
@ action
System
Definition
BlockingCollection.cs:8
source
ReLogic
ReLogic.Content
RunOnceAction.cs
Generated by
1.10.0