Package io.sentry.util.thread
Interface IMainThreadChecker
- All Known Implementing Classes:
MainThreadChecker
,NoOpMainThreadChecker
@Internal
public interface IMainThreadChecker
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the calling/current thread is the Main/UI threadboolean
isMainThread
(long threadId) boolean
isMainThread
(@NotNull SentryThread sentryThread) Checks if a given thread is the Main/UI threadboolean
isMainThread
(@NotNull Thread thread) Checks if a given thread is the Main/UI thread
-
Method Details
-
isMainThread
boolean isMainThread(long threadId) -
isMainThread
Checks if a given thread is the Main/UI thread- Parameters:
thread
- the Thread- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
boolean isMainThread()Checks if the calling/current thread is the Main/UI thread- Returns:
- true if it is the main thread or false otherwise
-
isMainThread
Checks if a given thread is the Main/UI thread- Parameters:
sentryThread
- the SentryThread- Returns:
- true if it is the main thread or false otherwise
-