@@ -595,7 +595,60 @@ public static void ResetAbort()
595
595
[ System . Security . SecurityCritical ] // auto-generated
596
596
[ MethodImplAttribute ( MethodImplOptions . InternalCall ) ]
597
597
private extern void ResumeInternal ( ) ;
598
- #endif // !FEATURE_CORECLR
598
+
599
+ /*=========================================================================
600
+ ** Interrupts a thread that is inside a Wait(), Sleep() or Join(). If that
601
+ ** thread is not currently blocked in that manner, it will be interrupted
602
+ ** when it next begins to block.
603
+ =========================================================================*/
604
+ [ System . Security . SecuritySafeCritical ] // auto-generated
605
+ [ SecurityPermission ( SecurityAction . Demand , ControlThread = true ) ]
606
+ public new void Interrupt ( ) => base . Interrupt ( ) ;
607
+
608
+ /*=========================================================================
609
+ ** Returns the priority of the thread.
610
+ **
611
+ ** Exceptions: ThreadStateException if the thread is dead.
612
+ =========================================================================*/
613
+
614
+ public new ThreadPriority Priority
615
+ {
616
+ [ System . Security . SecuritySafeCritical ] // auto-generated
617
+ get
618
+ {
619
+ return base . Priority ;
620
+ }
621
+ [ System . Security . SecuritySafeCritical ] // auto-generated
622
+ [ HostProtection ( SelfAffectingThreading = true ) ]
623
+ set
624
+ {
625
+ base . Priority = value ;
626
+ }
627
+ }
628
+
629
+ /*=========================================================================
630
+ ** Returns true if the thread has been started and is not dead.
631
+ =========================================================================*/
632
+ public new bool IsAlive
633
+ {
634
+ [ System . Security . SecuritySafeCritical ] // auto-generated
635
+ get
636
+ {
637
+ return base . IsAlive ;
638
+ }
639
+ }
640
+
641
+ /*=========================================================================
642
+ ** Returns true if the thread is a threadpool thread.
643
+ =========================================================================*/
644
+ public new bool IsThreadPoolThread
645
+ {
646
+ [ System . Security . SecuritySafeCritical ] // auto-generated
647
+ get
648
+ {
649
+ return base . IsThreadPoolThread ;
650
+ }
651
+ }
599
652
600
653
/*=========================================================================
601
654
** Waits for the thread to die or for timeout milliseconds to elapse.
@@ -606,6 +659,15 @@ public static void ResetAbort()
606
659
** ThreadInterruptedException if the thread is interrupted while waiting.
607
660
** ThreadStateException if the thread has not been started yet.
608
661
=========================================================================*/
662
+ [ System . Security . SecuritySafeCritical ]
663
+ [ HostProtection ( Synchronization = true , ExternalThreading = true ) ]
664
+ public new void Join ( ) => base . Join ( ) ;
665
+
666
+ [ System . Security . SecuritySafeCritical ]
667
+ [ HostProtection ( Synchronization = true , ExternalThreading = true ) ]
668
+ public new bool Join ( int millisecondsTimeout ) => base . Join ( millisecondsTimeout ) ;
669
+ #endif // !FEATURE_CORECLR
670
+
609
671
[ HostProtection ( Synchronization = true , ExternalThreading = true ) ]
610
672
public bool Join ( TimeSpan timeout )
611
673
{
@@ -761,6 +823,42 @@ private void SetStartHelper(Delegate start, int maxStackSize)
761
823
public extern void DisableComObjectEagerCleanup ( ) ;
762
824
#endif //FEATURE_COMINTEROP
763
825
826
+ #if ! FEATURE_CORECLR
827
+ /*=========================================================================
828
+ ** Return whether or not this thread is a background thread. Background
829
+ ** threads do not affect when the Execution Engine shuts down.
830
+ **
831
+ ** Exceptions: ThreadStateException if the thread is dead.
832
+ =========================================================================*/
833
+ public new bool IsBackground
834
+ {
835
+ [ System . Security . SecuritySafeCritical ] // auto-generated
836
+ get
837
+ {
838
+ return base . IsBackground ;
839
+ }
840
+ [ System . Security . SecuritySafeCritical ] // auto-generated
841
+ [ HostProtection ( SelfAffectingThreading = true ) ]
842
+ set
843
+ {
844
+ base . IsBackground = value ;
845
+ }
846
+ }
847
+
848
+ /*=========================================================================
849
+ ** Return the thread state as a consistent set of bits. This is more
850
+ ** general then IsAlive or IsBackground.
851
+ =========================================================================*/
852
+ public new ThreadState ThreadState
853
+ {
854
+ [ System . Security . SecuritySafeCritical ] // auto-generated
855
+ get
856
+ {
857
+ return base . ThreadState ;
858
+ }
859
+ }
860
+ #endif // !FEATURE_CORECLR
861
+
764
862
#if FEATURE_COMINTEROP_APARTMENT_SUPPORT
765
863
/*=========================================================================
766
864
** An unstarted thread can be marked to indicate that it will host a
@@ -786,6 +884,15 @@ public ApartmentState ApartmentState
786
884
}
787
885
}
788
886
887
+ #if ! FEATURE_CORECLR
888
+ [ System . Security . SecuritySafeCritical ] // auto-generated
889
+ public new ApartmentState GetApartmentState ( ) => base . GetApartmentState ( ) ;
890
+
891
+ [ System . Security . SecuritySafeCritical ] // auto-generated
892
+ [ HostProtection ( Synchronization = true , SelfAffectingThreading = true ) ]
893
+ public new bool TrySetApartmentState ( ApartmentState state ) => base . TrySetApartmentState ( state ) ;
894
+ #endif // !FEATURE_CORECLR
895
+
789
896
[ System . Security . SecuritySafeCritical ] // auto-generated
790
897
[ HostProtection ( Synchronization = true , SelfAffectingThreading = true ) ]
791
898
public void SetApartmentState ( ApartmentState state )
@@ -1115,7 +1222,7 @@ private CultureInfo GetCurrentCultureNoAppX() {
1115
1222
#endif
1116
1223
}
1117
1224
1118
- #if! FEATURE_LEAK_CULTURE_INFO
1225
+ #if ! FEATURE_LEAK_CULTURE_INFO
1119
1226
[ System . Security . SecurityCritical ] // auto-generated
1120
1227
[ DllImport ( JitHelpers . QCall , CharSet = CharSet . Unicode ) ]
1121
1228
[ SuppressUnmanagedCodeSecurity ]
@@ -1147,7 +1254,7 @@ internal Context GetCurrentContextInternal()
1147
1254
}
1148
1255
return m_Context ;
1149
1256
}
1150
- #endif
1257
+ #endif
1151
1258
1152
1259
1153
1260
#if FEATURE_IMPERSONATION
@@ -1187,7 +1294,7 @@ private void SetPrincipalInternal(IPrincipal principal)
1187
1294
}
1188
1295
#endif // FEATURE_IMPERSONATION
1189
1296
1190
- #if FEATURE_REMOTING
1297
+ #if FEATURE_REMOTING
1191
1298
1192
1299
// This returns the exposed context for a given context ID.
1193
1300
[ System . Security . SecurityCritical ] // auto-generated
@@ -1233,7 +1340,7 @@ public static AppDomain GetDomain()
1233
1340
if ( ad == null )
1234
1341
ad = GetDomainInternal ( ) ;
1235
1342
1236
- #if FEATURE_REMOTING
1343
+ #if FEATURE_REMOTING
1237
1344
Contract . Assert ( CurrentThread . m_Context == null || CurrentThread . m_Context . AppDomain == ad , "AppDomains on the managed & unmanaged threads should match" ) ;
1238
1345
#endif
1239
1346
return ad ;
0 commit comments